bodar / jcompilo

A pure Java 7+ build tool with advanced compiler features and strong opinions
38 stars 3 forks source link

AntTestOutput produces invalid XML if a test fails #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a failing JUnit test case, e.g. assertEquals(1, 2)
2. Run tests under jcompilo to produce XML output
3. Produced /error/@type is incorrect:
   a) It has not been XML-escaped so is invalid XML
   b) It contains the whole failure.getException().toString() instead of just the class name failure.getException().getClass().getName().
   c) Other tools report test failures using <failure> element rather than <error>

What is the expected output? What do you see instead?

Expected output (produced using Ant junit task):
<failure message="expected:&lt;1&gt; but was:&lt;2&gt;" 
type="junit.framework.AssertionFailedError">

Actual output (produced using jcompilo 176):
<error message="expected:&lt;1&gt; but was:&lt;2&gt;" 
type="java.lang.AssertionError: expected:<1> but was:<2>">

What version of the product are you using? On what operating system?

jcompilo 176, Windows 7 64-bit.

Original issue reported on code.google.com by jamie.sh...@gmail.com on 31 Mar 2014 at 11:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 0f8fb08f80bc.

Original comment by daniel.bodart@gmail.com on 1 Apr 2014 at 8:53