• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I 'unit Test ' a jsp page ?

 
onki rumen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can I do a unit testing for a jsp page ? if its a model java class then I can test it using Junit all those assertTrue assertNotnull assertEquals stuffs .... but how can I do the unit testing for a jsp page ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are writing JSP pages to modern standards, all the Java code will be in units other than JSPs and available for testing.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to test that some particular JSP page generates some particular HTML output, have a look at the jWebUnit library (on SourceForge). It can be used for running web requests against a server, and for checking the resulting HTML pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!