Using JUnit for a Webpage to be designed in JSP
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   R_B
Posted On:   Monday, April 7, 2003 11:39 AM

Hi All:

I am new to the concept of extreme programming . I was wondering if there is a way out to develope a webpage(that stores some information in the database and when asked by the user returns the information) following the XP methedology and using JSP, I am not sure if I will be able to come up with test units using JUnits in this(using JSP) case.

Please lemme know more about this.(if possible with some examples please, as they will help me understand it better)

Thanks

Regards
RB

Re: Using JUnit for a Webpage to be designed in JSP

Posted By:   Anonymous  
Posted On:   Tuesday, April 8, 2003 01:12 AM

I totally agree with Jeanne - make your JSPs as "dumb" as possible, so that you don't feel much need to test them.

You might still want to write some tests for the JSPs, though. For this, take a look at the collection of tools at http://www.junit.org/news/extension/web/.

Re: Using JUnit for a Webpage to be designed in JSP

Posted By:   Jeanne_Boyarsky  
Posted On:   Monday, April 7, 2003 05:40 PM

The code to access the database should not be in the JSP. It should be in a java class. This java class can be tested with JUnit. Take a look at mockobjects.com to see how to simulate the database.
About | Sitemap | Contact