0

I am working on a Spring-MVC application(config XML based, no Main class) in which I would like to do testing. I have known that there is a way to test code which is backend+frontend code. For that, I thought there would be some way I can check by running the code automatically in browser, which fills up forms, logs me in, etc.

And while that happens, I would be able to see in console as well as in the browser as to what is happening..

I have seen this in one of the company, but don't know how they were doing it. Any ideas? Is it suitable for Spring-MVC?

2 Answers 2

1

The most common way of automating web testing through the front end is via a system called Selenium. It is server-architecture neutral, so it can be used with Spring or any other framework.

I would also highly recommend running integration tests without the ui, by using code that directly calls your controller methods, isolated from the server framework. Such tests are easier to write (once you get the hang of them) and less likely to break due to interface changes than ui-level tests.

2
  • Actually running it with UI is the requirement, can you give some head start on that. Thank you. :-) Commented Mar 14, 2016 at 9:25
  • Any way to automate the whole testing thing, maybe by connecting some software and then it doing the work? Commented Mar 14, 2016 at 9:31
-1

I learned Selenium in a few days. It's free. It's really easy to get started with 'Selenium IDE', A user-friendly front-end with a screen recording function and great documentation. Once you get a feel for the IDE you can export your tests and run them through JUnit or TestNG using the 'Selenium Webdriver'.

1
  • 1
    @mean fiddler -- the downvote (not mine) was probably because your answer does not improve on any of the existing answers.
    – Jay Elston
    Commented Mar 18, 2016 at 18:39

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.