As my last post about test2junit is some time ago, here is the very brief description: test2junit is a Leiningen plug-in that provides improved JUnit XML format output when executing clojure.test tests. In addition, it allows to automatically run the corresponding JUnit Report Ant task for generating HTML from the XML output. An example is available on the test2junit repository.
In this post, I announce the release of version 1.3.0 and briefly discuss the changes since the last announcement. The most relevant changes since the last announcement are:
- Fix issue #10: “File and line is not reported correctly on test failures”
- Include System Properties in output.
- Include Stdout and Stderr in output.
- Some minor improvements to the output structure.
With the fix to issue #10, the file and source code line at which a problem occurred are properly shown. It turned out that the culprit was just a wrong index. Thanks a lot to Andrew for spotting and reporting the issue!
System Properties of the JVM executing the tests are now included. Before just nothing was emitted for this part of the XML. An example for how this looks can be seen in the example output by scrolling to the bottom and clicking on “Properties”.
Furthermore, Stderr and Stdout are also included in the XML output. An example for how this looks can be seen in the example output by scrolling to the bottom and clicking “System.err” or “System.out” respectively.
The content shown for “System.out” actually includes Stderr as well. The reason for this is that I think it would make reading the output more complicated when Stderr and Stdout are separated into two different outputs. It would be, e.g., more difficult to related messages from Stdout and Stderr to each other. The output for “System.err” only shows Stderr. This makes it easier to check for important output from Stderr.
One potential drawback of including Stderr and Stdout in the XML output is that the output has to be redirected for capturing it such that it is not printed in real-time in the console right now. To accommodate this, the output is printed after collecting it.
This has two consequences: instead of being printed in “real-time” the output is printed in batches after the capture of one unit of output was done. In addition, Stderr and Stdout are both printed to Stdout. However, so far, I did not encounter negative effects of this in practice yet.
I hope that you consider the changes useful. In case you have comments, requests, or other feedback, it would be great if you send me your feedback.