setNumberOfPassedTests(fullBuildStatistics.getPassedTestCount());
final List<Test> failedTests = new ArrayList<>();
for (STestRun oneTestRun : fullBuildStatistics.getFailedTests()) {
final STest failedTest = oneTestRun.getTest();
final TestName failedTestName = failedTest.getName();
failedTests.add(
new Test().
setPackageName(failedTestName.getPackageName()).
setClassName(failedTestName.getClassName()).
setMethodName(failedTestName.getTestMethodName()).
setError(oneTestRun.getFailureInfo().getShortStacktrace())
);
}
testReport.setFailedTests(failedTests);
final List<Test> ignoredTests = new ArrayList<>();
for (STestRun oneTestRun : fullBuildStatistics.getIgnoredTests()) {
final STest ignoredTest = oneTestRun.getTest();
final TestName ignoredTestName = ignoredTest.getName();
ignoredTests.add(
new Test().
setPackageName(ignoredTestName.getPackageName()).
setClassName(ignoredTestName.getClassName()).
setMethodName(ignoredTestName.getTestMethodName()).
setError(oneTestRun.getIgnoreComment())
);
}
testReport.setIgnoredTests(ignoredTests);