commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren McGrath" <darren.mcgr...@mail.com>
Subject [PATCH] [jelly] Added setUp and tearDown attributes to SuiteTag
Date Tue, 31 Dec 2002 14:26:21 GMT
I've been using jelly for EAI testing and found that I was frequently using setUp and tearDown-type
scripts. I thought it would be neat and JUnit-like if these scripts could be added as attributes
to the test:suite which could then arrange for them to be called for each contained test:case
in the test:case context.

Attached is the patch file for the both the test cases and code.

Here's a snippet to show how it works ...
 
<define:script var="setUpScript">   
   <!-- fixture setUp goes here -->
</define:script> 

<define:script var="tearDownScript">
    <!-- fixture tear-down goes here -->
</define:script>
 
<!--
   || @setUp is called before each test:case.
   || @tearDown is called after each test:case.
   || @setUp and @tearDown run in the same context as each test:case.
-->
<test:suite setUp="${setUpScript}" tearDown="${tearDownScript}">
  <test:case name="testcase1">
    <!-- test case   ..... -->
  </test:case>
</test:suite>
 

If there's a better approach that i've missed i'd be happy to discuss/code it/try it out.
 
cheers
 
Darren McGrath
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Meet Singles
http://corp.mail.com/lavalife


Mime
View raw message