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.
If a test throws an exception that will in turn throw another exception when its message is retrieved, Netbeans stops all tests and reports "passed". I have observed this behavior since before version 8.0. ## Steps to reproduce. 1. Create a new Netbeans project with a main class 2. Right-click the main class file and select Tools->Create/Update Tests 3. Select JUnit 4.x and create the test file 4. Replace the test file code with the following: import org.junit.Test; public class JavaApplication1Test { private static class BadException extends Exception { @Override public String getMessage() { throw new RuntimeException(); } } @Test public void test() throws Exception { throw new BadException(); } } 5. Right click in the editor and select Test File ## Expected result. Netbeans Test Results panel indicates the test failed. ## Actual result. Netbeans Test Results panel indicates the test passed.