jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Agrawal" <a.agra...@popnet.co.in>
Subject Please give me feedback
Date Fri, 16 May 2003 12:48:17 GMT
Hi,

 In writing DRC cactus automated tests, I faced following problems.
 
 I found alternative solution for them due to that testcases became
 more  complicated.
 
 Please give me your feedback.
 
 1) Ideal procedure
    ---------------
    Cactus provides redirector servlet to test any servlet.
    
    Cactus also provides implicit object request,response etc.
    
    We can use this implicit object like
    request.setUserData(requestBytes);
 
    Now When we instantiate our servlet (e.g. PKICommsSwitch) 
    Cactus uses ServletRedirector and automatically call the  servlet.
    
   -> while testing PKICommsSwitch, I found that with above approach
      cactus alters this message. 
      
   ->  During research face, I successfully  tested  our 
       servlet(TLV encoded request) with above approach. 
      
      
   Alternative solution adopted by me
   ----------------------------------
    Cactus extends the junit test cases. Instead of using the cactus
    ServletRedirector and  cactus API request.setUserData(requestBytes)
    I took http url connection to PKICommsSwitch and pass the
requestBytes.
    My testcase extends the cactus testcase but I am not using cactus 
    API.
    
    In the past We used to write our servlet test junit test cases using
the
    solution adopted by me.
    
 2) Maximum problem I faced in session management.
    
    Cactus does session management per testcase only.
    
    After Authentication PKICommsSwitch Servlet sets CLPUEK in session.
    For Rest of requests PKICommsSwitch gets the CLPUEK from session.
    
    -> For the testing of DRC seq-3,5,7, & 9 
       I wrote a test servlet which gives me CLPUEK after parsing
       the Seq-01.txt.
       
       From setup() method  of my testcases, I call this servlet
       which sets require CLPUEK in the session.
       
with regards
anil           

Mime
View raw message