You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Apache Wiki <wi...@apache.org> on 2006/02/18 22:31:02 UTC
[Ant Wiki] Update of "AntNewbies" by SteveLoughran
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:
http://wiki.apache.org/ant/AntNewbies
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 run.
+
'''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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org