Derive your own class from File code the listFile() method ordering the way you see fit.. -Martin ----- Original Message ----- From: "J. Xue" <[EMAIL PROTECTED]> To: "Ant Users List" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
