This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Given a project containing a JUnit based test with one test (assume test passes), run the test via "Run File" on the test file. The JUnit output window will appear with a root node that says "The test passed" (text will be different if more than one test is in the file). Now put a breakpoint in the test method and debug the test via "Debug File" on the test file. When the test hits the breakpoint, detach the debugger via <Finish> and let the test complete. The JUnit output window will appear, but the text is wrong. The root node says "No tests executed.", while it has a child node indicating that a test did run and it did pass.
Created attachment 58417 [details] Snapshot showing misleading text.
Confirmed in build 080402.
It seems that the JUnitOutputReader does not get any more event messages once the debugger is detached.
When the debugger is detached, it kills the JVM that is running the tests. The problem is that the JUnit module is not able to cope with interruption of tests and displays incorrect results in such case.
Fixed. Changeset Id: 909640abcdc1 (http://hg.netbeans.org/main/rev/909640abcdc1) Modified and new files: junit/src/org/netbeans/modules/junit/output/Bundle.properties junit/src/org/netbeans/modules/junit/output/HtmlMarkupUtils.java (new file) junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java junit/src/org/netbeans/modules/junit/output/RegexpUtils.java junit/src/org/netbeans/modules/junit/output/Report.java junit/src/org/netbeans/modules/junit/output/RootNode.java junit/src/org/netbeans/modules/junit/output/TestMethodNode.java junit/src/org/netbeans/modules/junit/output/TestMethodNodeChildren.java junit/src/org/netbeans/modules/junit/output/TestsuiteNode.java junit/src/org/netbeans/modules/junit/output/XmlOutputParser.java
Integrated into 'main-golden', available in NB_Trunk_Production #306 build Changeset: http://hg.netbeans.org/main/rev/909640abcdc1 User: Marian Petras <mpetras@netbeans.org> Log: fixed bug #130206 - "Test display incorrect when execution of tests is interrupted"