public void doExecuteTests() { if (WikiImportProperty.isImported(data)) { importWikiPages(); } try { performExecution(); } catch (Exception e) { // Is this necessary? Or is the exception already handled by stopTestSystem? mainFormatter.errorOccurred(e); LOG.log(Level.WARNING, "error registered in test system", e); } exitCode = mainFormatter.getErrorCount(); }
@Override public void errorOccurred(Throwable cause) { if (testHistoryFormatter != null) { testHistoryFormatter.errorOccurred(cause); } super.errorOccurred(cause); }
@Override public void testComplete(WikiTestPage test, TestSummary testSummary) throws IOException { testHistoryFormatter.testComplete(test, testSummary); testHistoryFormatter.close(); referenceToCurrentTest.setTestSummary(testSummary); referenceToCurrentTest.setRunTimeInMillis(testHistoryFormatter.runTime()); suiteExecutionReport.addPageHistoryReference(referenceToCurrentTest); suiteExecutionReport.tallyPageCounts( ExecutionResult.getExecutionResult(test.getName(), testSummary)); testHistoryFormatter = null; super.testComplete(test, testSummary); }
@Override public void testExceptionOccurred(Assertion assertion, ExceptionResult exceptionResult) { testHistoryFormatter.testExceptionOccurred(assertion, exceptionResult); super.testExceptionOccurred(assertion, exceptionResult); }
@Override public void testAssertionVerified(Assertion assertion, TestResult testResult) { testHistoryFormatter.testAssertionVerified(assertion, testResult); super.testAssertionVerified(assertion, testResult); }
@Override public void testSystemStopped(TestSystem testSystem, Throwable cause) { super.testSystemStopped(testSystem, cause); }