ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Ant Wiki] Update of "AntNewbies" by SteveLoughran
Date Sat, 18 Feb 2006 21:31:02 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ant Wiki" for change notification.

The following page has been changed by SteveLoughran:

The comment on the change is:
good junit practise

  I cannot make a case specifically about the above question as I did not submit the question
however I do have an interest in having a fileset sort files. The case is for using a fileset
to determine the order of JUnits tests to execute.  It would allow for a flow based on package
name where we could have a setup package, a test package and a teardown package.  These JUnits
would not be typical unit tests but rather integration tests.
+ '''Answer #6 followup followup''' 
+ You can't rely on Junit behaving predictably in this situation. Junit is a lot more complex
than you expect, and far more quirky. Better to have one task/target to set up/deploy, another
to run the tasks and a third to do teardown --outside junit. The trick is to not fail the
junit task when the tests fail, just set a failure property and <fail> on that later,
after doing cleanup. See also Apache Cactus for integrating webapp deployment into a test
  '''Answer #6 followup #2''' - Those needing this functionality should be pleased to know
that Ant 1.7 will support a new concept--ResourceCollection--an interface which exposes objects
of the existing Ant filelike-type Resource. Fileset, Dirset, Filelist, Path, etc. all implement
this new interface. One of the new ResourceCollection implementations is the <sort>
collection, which can sort resources according to their natural order, or by one or a combination
of ResourceComparators. Several of these have been predefined; however a user can custom-implement
and <typedef> his or her own ResourceComparator as well. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message