// create a fake test output
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter pw = new PrintWriter(baos, true);
e.printStackTrace(pw);
TestIdentifier fakeTest = new TestIdentifier(device.getClass().getName(), "runTests");
runListener.testStarted(fakeTest);
runListener.testFailed(ITestRunListener.TestFailure.ERROR, fakeTest , baos.toString());
runListener.testEnded(fakeTest, emptyMetrics);
// end the run to generate the XML file.