Sunday, May 16, 2021

Apache Ant 1.10.10 released - Better test result summary from junitlauncher task

Apache Ant 1.10.10 got released around a month back. Among the usual bug fixes, we added a new enhancement for the "junitlauncher" task.

For those of you who haven't used or know about "junitlauncher" task, it's a new task we introduced a few years back to allow projects using Ant, to be able to use the new JUnit5 testing framework. The previous (and still supported) "junit" task is meant to be used only if you want to continue using just JUnit4. If you plan to use JUnit5 (which also supports JUnit4 style testcases), then you will have to use the "junitlauncher" task.

This "junitlauncher" task has been around for a few years now and some users have reported that its "printSummary" feature isn't of much use. People familiar with the "junit" task will know that when a test gets run, the task prints an instantaneous summary like:

org.myapp.foo.bar.SimpleTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec

This is useful to see a quick summary of the tests being run.

The "junitlauncher" has a "printSummary" attribute which until Ant 1.10.10 version used to print a summary after all the tests had been executed. Furthermore, the printed summary was a summary that the JUnit5 framework generates by default, something like:

[junitlauncher]
[junitlauncher] Test run finished after 5103 ms
[junitlauncher] [         2 containers found      ]
[junitlauncher] [         0 containers skipped    ]
[junitlauncher] [         2 containers started    ]
[junitlauncher] [         0 containers aborted    ]
[junitlauncher] [         2 containers successful ]
[junitlauncher] [         0 containers failed     ]
[junitlauncher] [         1 tests found           ]
[junitlauncher] [         0 tests skipped         ]
[junitlauncher] [         1 tests started         ]
[junitlauncher] [         0 tests aborted         ]
[junitlauncher] [         1 tests successful      ]
[junitlauncher] [         0 tests failed          ]

As you can see, summary of this form isn't really useful. So some of the Ant users requested (https://bz.apache.org/bugzilla/show_bug.cgi?id=64836) this to be improved to provide a summary which resembled what we have with the "junit" task.

This Ant 1.10.10 release now consists that enhancement. When you use "printSummary=true" on the "junitlauncher" task, it will now print a more useful and immediate summary like the "junit" task does:

Running org.myapp.foo.bar.SimpleTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec


As usual, the release is available for download at the Ant downloads page https://ant.apache.org/bindownload.cgi. Please give this a try and if you have any suggestion or feedback on this release, please get in touch with us on our mailing lists https://ant.apache.org/mail.html or our issue tracker https://ant.apache.org/bugs.html.

 

Saturday, October 26, 2019

Apache Ivy 2.5.0 released

This week, we released 2.5.0 version of Apache Ivy. Apache Ivy is a build dependency manager that is integrated with the Apache Ant build tool. The download is available as usual at https://ant.apache.org/ivy/download.cgi.

This 2.5.0 version comes after a long gap in releases of Ivy. 2.4.0 was released way back on December 26 2014. After that, the project has seen slowness in development activities. However, with help from the some community members, especially Nicolas Lalevée, back in around 2017, we had some bug fixes and enhancements done. On April 19 2018, we released 2.5.0-rc1. We called it a "rc1" because it was a long time since we had done a project release and wanted users to be aware that there might be some unexpected issues.

2.5.0-rc1 saw some community members using this version and reporting back some bugs that they ran into. We have been able to fix them during this past year and it was now finally time to release it as 2.5.0. We expect the Ivy community to start using this version in favour of older releases and report back any issues that they run into either at https://issues.apache.org/jira/browse/IVY or in our Ivy user mailing list https://ant.apache.org/mail.html

Users migrating from previous versions of Ivy are recommended to use a fresh/clean Ivy local cache to avoid certain issues with cached Ivy metadata that might have been introduced in a previous version (2.5.0-rc1) of Ivy.

The complete list of changes (since 2.4.0) that are part of this release is available at https://ant.apache.org/ivy/history/2.5.0/release-notes.html.

Going forward, the goal is to fix any bugs that are reported and introduce certain enhancements that will help improve the usage of the tool.

Friday, September 06, 2019

Ant 1.10.7 released - Ability to include/exclude JUnit 5 "tags" during test execution

1.10.7 version of Ant has just been released yesterday. This release consists mostly bug fixes and some minor enhancements. The downloads are as usual available at https://ant.apache.org/bindownload.cgi

Notable among these bug fixes is a fix to a regression that happened in our 1.10.6 release. In that 1.10.6 release, we accidentally broke compatibility against Java 8. Ant 1.10.x releases are supposed to support Java runtimes starting from Java 8. However, during our previous release, our use of javac compilation attributes caused us to generate a binary which in some cases would run into issues when run against Java 8. This issue has now been fixed in this 1.10.7 release. More details about the regression are available in the bugzilla issue here https://bz.apache.org/bugzilla/show_bug.cgi?id=63457.

Among the enhancements that have made it into this newer release, includes an enhancement to the junitlauncher task. The junitlauncher task is meant for running JUnit 5 framework based test cases. In this 1.10.7 release of Ant, thanks to a contribution from Matthias Gutheil (https://github.com/MatthiasGutheil), this task now allows you to include or exclude JUnit 5 "tags" from a particular execution of tests. New attributes "includeTags" and "excludeTags" have been introduced to support selecting the relevant tags for execution. The junitlauncher task manual https://ant.apache.org/manual/Tasks/junitlauncher.html has the complete details.

As usual, any suggestions, feedback or questions can be raised in our user mailing list https://ant.apache.org/mail.html.