ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: run junit tests in a certain order
Date Wed, 26 Nov 2003 07:13:16 GMT
Derive your own class from File
code the listFile() method ordering the way you see fit..
-Martin
----- Original Message ----- 
From: "J. Xue" <ant@manifoldronin.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Tuesday, November 25, 2003 7:49 PM
Subject: run junit tests in a certain order


>
> I'm sure I'm not the first one having this problem but can't find anything
on
> google.
>
> I would like to be able to run some JUnit tests in a certain order, e.g.,
> starting from the most basic ones.  There doesn't seem to be a perfect way
to
> do this using the <junit> task.  <batchtest> takes a fileset, so the order
of
> the test files is basically determined by File.listFile(), which returns
files
> in an OS-specific order.
>
> For a workaround, I wrote a master test suite, in which I read from a file
> that has the list of test files in the order I want them to run.  I then
run
> it using <test>.  Now everything works fine as far as order enforcement is
> concerned - but all the test methods are listed under the master test
suite
> class in the report!  So if I have two test methods from different classes
> with the same name, I wouldn't be able to tell which is which.
>
> Other options include hardcoding the order into build.xml, or hack the
source
> code for <batchtest> to take a file list.  Neither of those paths smells
like
> a pleasant solution, though.
>
> Any hint would be appreciated.
> --J.X.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message