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.
When trying to run any JUnit tests, this Error message is displayed in the statistics tab: "Failed to prepare tests" That this message exist is a bug in itself, since it gives no information to what the problem might be. Secondly no documenttion exist that helps an user to understand this message. What does it mean? Why is it not informative?
The common reason is that compilation of source or test classes fails. More details can be found in the normal Output window (Ctrl-4). I agree the message should be more informative. At least it should direct the user to the output window.
*** Issue 73545 has been marked as a duplicate of this issue. ***
Fixed in the trunk. The JUnit results window will not be so eager after this change. If compilation fails (more generally: if the "build" fails before any test is started), the results window does not get activated so the user see the compiler output in the default output window. Modified files: src/org/netbeans/modules/junit/output/JUnitOutputReader.java (1.19) src/org/netbeans/modules/junit/output/junit-test-results.settings (1.2) src/org/netbeans/modules/junit/output/TaskType.java (1.1 - initial revision) src/org/netbeans/modules/junit/output/junit-test-results.wstcref (1.2) src/org/netbeans/modules/junit/output/AntSessionInfo.java (1.3) src/org/netbeans/modules/junit/output/Manager.java (1.10) src/org/netbeans/modules/junit/output/JUnitAntLogger.java (1.14) nbproject/project.properties (1.8) Diffs: http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitOutputReader.java?r1=1.18&r2=1.19&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/junit-test-results.settings?r1=1.1&r2=1.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/TaskType.java?rev=1.1&content-type=text/vnd.viewcvs-markup http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/junit-test-results.wstcref?r1=1.1&r2=1.2&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/AntSessionInfo.java?r1=1.2&r2=1.3&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/Manager.java?r1=1.9&r2=1.10&diff_format=u http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/output/JUnitAntLogger.java?r1=1.13&r2=1.14&diff_format=u http://junit.netbeans.org/source/browse/junit/nbproject/project.properties?r1=1.7&r2=1.8&diff_format=u The change fixes also the following bugs: bug #59883 - Floating window wars between JU output & all others windows bug #70749 - JUnit Results window does not display for tests run from freeform projects bug #73933 - JUnit window pops up after running Ant 'test' target bug #76587 - JUnit results window often reopens itself
Verified. JUnit results window won't display until all tests are successfully compiled. ---- NetBeans IDE Dev (Build 200608071800) 1.6.0-rc; Java HotSpot(TM) 64-Bit Server VM 1.6.0-rc-b94 SunOS version 5.10 running on sparcv9 en (nb); ISO646-US