ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis Boudart <>
Subject Re: Migration of Ant test to JUnit4
Date Mon, 14 Apr 2014 06:15:36 GMT
Great job !

2014-04-12 15:37 GMT+02:00 Michael Clarke <>:

> Hi,
> I've now completed the migration of Ant's test cases to JUnit4 and would
> like to give other developers a chance to review/comment on these changes
> before I merge them back into SVN. My changes can be found on Github at
> (
> for anyone
> who wants to apply a patch against their local workspace).
> Notable changes:
> 1. Deprecation of
> and
> 2. Introduction of and
> to replace deprecated
> classes, but with the removal of methods directly relating to asserting
> values
> 3. Introduction of to provide additional
> Asserts beyond the default JUnit ones, and thecreation of
> to provide common file utilities used in
> many tests
> 4. Addition of @Test annotation to all Test methods, and addition or
> @Ignore annotations to methods that had previously been commented out or
> named in a way that prevented JUnit 3 seeing/running them.
> 5. Use of JUnit's Assume to dynamically skip tests that previously silently
> returned if certain conditions weren't met (e.g. the Symlink tests not
> running on Windows)
> 6. TODO markers added to tests that previously used exception handling
> checks but didn't check the value of the exception being returned. I'll
> look at coming back to these in the future to add proper asserts and remove
> the TODOs.
> 7. Removal of Thread.sleep in tests, and the sleep command in associated
> XML build files where this has been used to force a difference in file
> creation timestamps, and the use of File.setLastModified() instead. This
> has knocked 1 minute 30 seconds off the JUnit execution time using
> Cloudbees Buildhive Jenkins instance, although I've not looked at whether
> similar can be done for the AntUnit tests.
> 8. Updated the documentation for writing tests to refer to the new 'Rule'
> classes rather than the previous Test classes
> I'll hold of committing these changes to SVN for a couple of days to give
> people a chance to comment. Unless I hear any significant objections to
> these changes by the middle of Wednesday, I'll look commit to SVN on
> Wednesday night (UK time).
> Thanks,
> Michael

Jean Louis Boudart
Independent consultant
Apache EasyAnt commiter

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message