TestResult () { TestResult testResult = super.createTestResult(); testResult.addListener(myTestsListener); try { for (String listener : myListeners) { final IDEAJUnitListener junitListener = Class.forName(listener).asSubclass(IDEAJUnitListener.class).getConstructor().newInstance(); testResult.addListener(new TestListener() { @Override public void addError(Test test, Throwable t) {} @Override public void addFailure(Test test, AssertionFailedError t) {} @Override public void endTest(Test test) { if (test instanceof TestCase) { junitListener.testFinished(test.getClass().getName(), ((TestCase)test).getName()); } } @Override public void startTest(Test test) { if (test instanceof TestCase) { junitListener.testStarted(test.getClass().getName(), ((TestCase)test).getName()); } } }); } } catch (Exception e) { //do nothing } return testResult; }