aspose file tools*
The moose likes Testing and the fly likes How to unit test web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to unit test web application" Watch "How to unit test web application" New topic
Author

How to unit test web application

raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Hi can any one explain how to do unit testing for a web application.Any example code or link will be helpful.Thanks in advance.And please tell me what we can test with junit eg- jsp,servlet,pojo,ejb etc in a web application
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You can unit test pretty much any Java code, whether it's for a web application or a pure back-end system. You just instantiate the objects you want to test in your JUnit test method and go about asserting stuff.

What I suspect you're looking for, though, is functional testing of a web application. For that, you should look for tools such as JWebUnit, Watir and Selenium.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to unit test web application