*/
public File generateReportFor(final TestOutcome testOutcome, TestOutcomes allTestOutcomes) throws IOException {
Preconditions.checkNotNull(getOutputDirectory());
TestOutcome storedTestOutcome = testOutcome.withQualifier(qualifier);
Map<String,Object> context = new HashMap<String,Object>();
addTestOutcomeToContext(storedTestOutcome, allTestOutcomes, context);
if (containsScreenshots(storedTestOutcome)) {
generateScreenshotReportsFor(storedTestOutcome, allTestOutcomes);
}
addFormattersToContext(context);
addTimestamp(testOutcome, context);
String htmlContents = mergeTemplate(DEFAULT_ACCEPTANCE_TEST_REPORT).usingContext(context);
copyResourcesToOutputDirectory();
String reportFilename = reportFor(storedTestOutcome);
LOGGER.info("GENERATING HTML REPORT FOR " + storedTestOutcome.getCompleteName() + (qualifier != null? "/" + qualifier : "") + " => " + reportFilename);
return writeReportToOutputDirectory(reportFilename, htmlContents);
}