Hello,
> SCENARIO 2:
>
> public void testHelloJSP() throws IOException, ServletException {
> logger.debug("Beginning of testHelloJSP()");
> session.setAttribute("name" , "BLUE" ) ;
> pageContext.forward("/hello.jsp");
> logger.debug("End of testHelloJSP()");
> assertEquals("BLUE" , session.getAttribute("name"));
> }
>
> public void testTablesJSP() throws IOException, ServletException {
> logger.debug("Beginning of testTablesJSP()");
> session.setAttribute("name" , "Dharnidhar Vemuri" ) ;
> session.setAttribute("age" , "16" ) ;
> pageContext.forward("/Tables.jsp");
> logger.debug("End of testTablesJSP()");
> assertEquals("Dharnidhar Vemuri" , session.getAttribute("name"));
> }
>
> public void testOut() throws IOException, ServletException {
> logger.debug("Beginning of testHelloJSP()");
> session.setAttribute("name" , "BLUE" ) ;
> pageContext.forward("/hello.jsp");
> logger.debug("End of testHelloJSP()");
> assertEquals("BLUE" , session.getAttribute("name"));
>
> logger.debug("Beginning of testTablesJSP()");
> session.setAttribute("name" , "Dharnidhar Vemuri" ) ;
> session.setAttribute("age" , "16" ) ;
> pageContext.forward("/Tables.jsp");
> logger.debug("End of testTablesJSP()");
> assertEquals("Dharnidhar Vemuri" , session.getAttribute("name"));
> }
>
> public void endOut(HttpURLConnection huc )throws IOException ,
> ServletException {
> System.out.println( AssertUtils.getResponseAsString(huc) );
> }
> }
Cactua architecture goes something like this. Lets say we have a
test case by name XXX , we write 3 methods , beginXXX , testXXX,
endXXX . Now beginXXX and endXXX gets executed on the client, before
the request and after the response respectively. Only the method
testXXX gets executed on the server. Your eg, says that there are 3
testXXX cased but only one corresponding endXXX i.e. endOut .
Now if you are looking at the case testTablesJsp then if you want
the response output you may want to add another method, endTablesJsp
so that it gets executed on the client.
beginXXX --- > testXXXX
|
endXXX <---------
[ Client] [Server]
Probably you may like to modify it and report back what happened next.
=====
Thanks.
Rakesh Bhalla.
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com