Bug 75336 RemoteTestRunner.runFailed omits stack trace [JUnit]
i200409211200 RemoteTestRunner.runFailed omits the stack trace, just prints the exception message to the console. I was having a NPE while building a test suite, but the only feedback I would get would be: Failed to invoke suite(): java.lang.NullPointerException The code in the suite method was not trivial, so I could only figure out where it was happening by debugging with an NPE-based breakpoint.
org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
String trace= getTrace(t);
			sendMessage(MessageIds.RTRACE_START);
			sendMessage(trace);
			sendMessage(MessageIds.RTRACE_END);
			fWriter.flush();
		}
		String status= "OK"; 
		if (result.errorCount() > 0)
			status= "ERROR"; 
		else if (result.failureCount() > 0)
			status= "FAILURE"; 
		if (fPort != -1) {
			sendMessage(MessageIds.TEST_RERAN + testId+ " "+testClass+" "+testName+" "+status); 
			fWriter.flush();
		}
	}
	
	public static Object getField(Object object, String fieldName) {
	    Class clazz= object.getClass();
	    try {
	        Field field= clazz.getDeclaredField(fieldName);
	        field.setAccessible(true);
	        return field.get(object);	       
	    } catch (Exception e) {
	        
	    }
	    return null;
	}
}