@Override public void completed( TestDescriptorInternal testDescriptor, TestResult testResult, TestCompleteEvent completeEvent) { if (testDescriptor.getParent() == null) { resultCount = resultCount + testResult.getTestCount(); } if (!testDescriptor.isComposite() && testResult.getFailedTestCount() != 0) { failedTests.add( new FailedTest( testDescriptor.getName(), testDescriptor.getClassName(), getTaskPath(testDescriptor))); } }
public void afterTest(TestDescriptor testDescriptor, TestResult result) { if (!testDescriptor.isComposite()) { String className = testDescriptor.getClassName(); TestMethodResult methodResult = new TestMethodResult(testDescriptor.getName(), result); TestClassResult classResult = results.get(className); if (classResult == null) { classResult = new TestClassResult(className, result.getStartTime()); results.put(className, classResult); } classResult.add(methodResult); } }