Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I 'unit Test ' a jsp page ?  RSS feed

 
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: 66142
141
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: 42972
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!