jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JONES,TIM (HP-PaloAlto,ex1)" <timothy.jo...@hp.com>
Subject RE: Specifying testcases in XML?
Date Fri, 04 Apr 2003 18:07:44 GMT
Absolutely.  I was trying to figure out how to test methods in a controller
servlet (Struts based) that would look through a request object and based
upon a combination of cookies/parameters, set some request scope attribute.
With the number of possible inputs for each method at 5 or 6 that's 15 - 18
testcases, with no easy way to expand in the future or test wierd requests
observed in production without more code and re-compiling.

So it was worth it for us.

Tim

-----Original Message-----
From: Legelis, John [mailto:John.Legelis@fmr.com] 
Sent: Friday, April 04, 2003 9:54 AM
To: 'Cactus Users List'; 'timothy.jones@hp.com'
Subject: RE: Specifying testcases in XML?


Hi - 

Yes, I'd be interested in seeing your results - thanks.  Also, did you find
it useful to be able to separate the data from the test cases?

- John

-----Original Message-----
From: JONES,TIM (HP-PaloAlto,ex1) [mailto:timothy.jones@hp.com]
Sent: Friday, April 04, 2003 12:47 PM
To: 'Cactus Users List'
Subject: RE: Specifying testcases in XML?


John,

I brewed up my own set of classes to accomplish the same thing in cactus
(using the commons digester and a mock request container);  if you want to
see what I did, let me know.

I have never used jtestcase, but would be interested in helping if it was
deemed worthy to be integrated with cactus.

Tim

-----Original Message-----
From: Legelis, John [mailto:John.Legelis@fmr.com] 
Sent: Friday, April 04, 2003 8:49 AM
To: 'cactus-user@jakarta.apache.org'
Subject: Specifying testcases in XML?


Has anyone tried using JTestCase
(https://sourceforge.net/projects/jtestcase) in conjunction with Cactus to
allow test-case data to be specified in an xml file?  

For example: 
<method name="testCalculate" test-case="positive-minus"> <params> <param
name="var1" type="int">10</param> <param name="var2" type="int">20</param>
<param name="opt" type="java.lang.String">-</param> </params> <asserts>
<assert name="result" type="int" action="EQUALS">-10</assert> </asserts>

I might take a shot at integrating this with Cactus.  Anybody else
interested, or has this already been done?




---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org

Mime
View raw message