You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Darren McGrath <da...@mail.com> on 2002/12/31 15:26:21 UTC
[PATCH] [jelly] Added setUp and tearDown attributes to SuiteTag
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