Search code examples
unit-testingjspseleniumautomated-testsfunctional-testing

Functional testing JSP servlet based web application


I have developed a JSP servlet based web application and I would like to perform some functional testing on it.I know that functional test is to make sure that the application is performing actions which it is supposed to perform. I have googled and found out that Selenium can be used for automated functional testing.I saw that I can record my actions which can be replayed to me. Now since I am new to testing applications, I dont understand how replaying the actions is useful in testing. I have not performed any unit tests on my application,i mean formally using jUnit and stuff, although I used to just run parts of my code to check if it was working properly.Is that a bad thing as in not using formal unit testing frameworks.


Solution

  • Replaying is only useful to verify if the test is doing everything the tester intended. The key point is that Selenium can export the testcase you're seeing replaying to a fullworthy testcase class for among others JUnit. This class can then be added to the group of other testcases you have for the webapp. This can then be executed after automatic build as part of continuous integration.