The requirement isn“t build _process_ specific.
It is specific to the test.
And therefore it should be done in the setUp() and tearDown() methods
of your testcase.
Jan
> -----Original Message-----
> From: Patel, Rakesh [mailto:Rakesh.Patel@Metapack.com]
> Sent: Monday, July 14, 2003 12:13 PM
> To: 'user@ant.apache.org'
> Subject: Ant, JUnit and SQL
>
>
> Hi,
>
> I have a requirement to run db scripts prior and after each
> testcase. Whats
> the best way to do this? I use a wildcard to find the testcases:
>
> <batchtest>
> <fileset dir="${dir.src}">
> <include name="**/*Test.java"/>
> <exclude name="**/AllTests.java"/>
> </fileset>
> </batchtest>
>
> So what I would like to do is something like this:
>
> 1. for testcase, xxxTest, found by the above target,
> 2. run xxxsetup.sql
> 3. run xxxTest
> 4. run xxxteardown.sql
> 5. continue for each testcase
>
> I can use a naming convention for the sql scripts if that
> helps. I know I
> can put the call in the testcase itself but Ant has good functionality
> builtin for calling sql already and don't want to put jdbc
> code into my
> testcases as well.
>
> Thanks
>
> Rakesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
|