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.
Only failed test can be displayed in JUnit Test Results window. The toggle button which should switch between displaying all/only failed tests is not functional. Steps to reproduce: ------------------- 1)Run some succesfull tests --> Only a message that tests passed is displayed [nbdev200508111800, JDK 1.5.0_05, solaris10/sparc]
This is because the JUnit window has only one source of information - the output generated by the running <junit> task. Since the <junit> task does not produce information about passed tests (by default), they are not displayed in the JUnit Test Results window, either. Whether or not information about passed tests is displayed, this is determined by the format of the JUnit report. By default, J2SE projects use "brief" format of results, which does not display information about passed tests. It is possible, by changing project's "build.xml", to change this format to "plain" or "xml". Format "plain" displays information about both failed and passed tests, plus it displays information about duration of each test method. On the other side, it only displays names of test methods (and not names of the classes these methods pertain to). Format "xml" contains information about both failed and passed tests and it also displays names of classes - but it may have problems with some characters. The JUnit module supports (is able to parse) reports in any of these formats. For NB 4.2, I can make only one change - if the report does not contain information about individual passed test methods, display a note about the fact in the results window and disable the filter button. For future releases, I can provide my custom formatter and make it the default for newly created projects.
I think this does not follow UI spec. (http://ui.netbeans.org/docs/ui/junits/promo_f.html) But I think you solution is acceptable, altough it would be better if it could be managed to switch to "xml" format of results in newly created projects in promo F.
Fixed in the trunk. I have implemented the Jesse's proposal that if XML report file is available in the test results directory, I should profit from it by parsing it and display all available information (i.e. including list of passed tests). This should work for all projects that generate JUnit report files in XML format. Currently it works for J2SE projects and a should work soon for NB module projects, too (I will file a task for the necessary change in the NB module project file template). Modified files: junit/src/org/netbeans/modules/junit/output/: AntSessionInfo.java (1.2) JUnitAntLogger.java (1.9) XmlOutputParser.java (1.5) JUnitOutputReader.java (1.9) Report.java (1.8) Diffs: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/AntSessionInfo.java?r1=1.1&r2=1.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitAntLogger.java?r1=1.8&r2=1.9&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/XmlOutputParser.java?r1=1.4&r2=1.5&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.8&r2=1.9&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Report.java?r1=1.7&r2=1.8&diff_format=u
Verified in 200511151900. Thanks for the fix, this is certainly a great improvement.