Summary: | junit task timeout fails to write log information to xml and brief formatters | ||
---|---|---|---|
Product: | Ant | Reporter: | Brian Fitzpatrick <bmf> |
Component: | Optional Tasks | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bmf |
Priority: | P2 | ||
Version: | 1.7.0 | ||
Target Milestone: | 1.7.1 | ||
Hardware: | PC | ||
OS: | All |
Description
Brian Fitzpatrick
2005-07-06 20:13:41 UTC
hi, This issue is still present in ant 1.7.0. If the timeout is reached, or if the VM exits by its own, logs are displayed on the console but are not printed by the XML formatter. How an user is supposed to understand why a test had crashed if logs are lost ? :-) This is a known issue of the fact that the XML format includes summary attributes on the root element; the test result formatter builds up a DOM in memory and saves it on success. when the JVM is killed, no file, so no diagnostics. a brand new XML format would fix this, but there's no easy way to do an stream-to-disk version of the current format. What we could do is add an option to save the (incomplete) DOM to disk after every test. This is something you could turn on with a java property in the test process. It would make big test runs slower, but let people diagnose what the last test that finished was, and from that, infer what went wrong. I'm finding that, when using <junit> with a timeout and <batchtest>, if the timeout occurs there is no output written to the XML results file at all. The test does not then appear in the subsequent junitreport. As a result of this nobody noticed that a dozen or so of our tests were never being executed due to a timeout. A fix or workaround for this whould be highly appreciated. I think this has been fixed as a side effect of fixing bug 39946. In either case, svn revision 728058 contains testcases for this and they path with trunk as well as Ant 1.7.1. |