private void generateReportFor(final TestOutcome testOutcome, final TestOutcomes allTestOutcomes, final AcceptanceTestReporter reporter) { try { LOGGER.info(reporter + ": Generating report for test outcome: " + testOutcome.getCompleteName()); reporter.setOutputDirectory(outputDirectory); reporter.generateReportFor(testOutcome, allTestOutcomes); } catch (IOException e) { throw new ReportGenerationFailedError( "Failed to generate reports using " + reporter, e); } }
public void useQualifier(final String qualifier) { for (AcceptanceTestReporter reporter : getSubscribedReporters()) { reporter.setQualifier(qualifier); } }
/** * The default reporters applicable for standard test runs. */ public static List<AcceptanceTestReporter> getDefaultReporters() { List<AcceptanceTestReporter> reporters = new ArrayList<>(); FormatConfiguration formatConfiguration = new FormatConfiguration(Injectors.getInjector().getProvider(EnvironmentVariables.class).get()); ServiceLoader<AcceptanceTestReporter> reporterServiceLoader = ServiceLoader.load(AcceptanceTestReporter.class); Iterator<AcceptanceTestReporter> reporterImplementations = reporterServiceLoader.iterator(); // Service.providers(AcceptanceTestReporter.class); LOGGER.debug("Reporting formats: " + formatConfiguration.getFormats()); while (reporterImplementations.hasNext()) { AcceptanceTestReporter reporter = reporterImplementations.next(); LOGGER.debug("Found reporter: " + reporter + "(format = " + reporter.getFormat() + ")"); if (!reporter.getFormat().isPresent() || formatConfiguration.getFormats().contains(reporter.getFormat().get())) { LOGGER.debug("Registering reporter: " + reporter); reporters.add(reporter); } } return reporters; }
private void generateReportsFor(List<TestOutcome> outcomes) throws IOException { TestOutcomes allOutcomes = TestOutcomes.of(outcomes); for (TestOutcome outcome : allOutcomes.getOutcomes()) { if (shouldGenerate(OutcomeFormat.XML)) { getXMLReporter().generateReportFor(outcome, allOutcomes); } if (shouldGenerate(OutcomeFormat.JSON)) { getJsonReporter().generateReportFor(outcome, allOutcomes); } getHTMLReporter().generateReportFor(outcome, allOutcomes); } }
/** * The default reporters applicable for standard test runs. * * @return a list of default reporters. */ public static List<AcceptanceTestReporter> getDefaultReporters() { List<AcceptanceTestReporter> reporters = new ArrayList<AcceptanceTestReporter>(); FormatConfiguration formatConfiguration = new FormatConfiguration(Injectors.getInjector().getProvider(EnvironmentVariables.class).get()); ServiceLoader<AcceptanceTestReporter> reporterServiceLoader = ServiceLoader.load(AcceptanceTestReporter.class); Iterator<AcceptanceTestReporter> reporterImplementations = reporterServiceLoader.iterator(); // Service.providers(AcceptanceTestReporter.class); LOGGER.info("Reporting formats: " + formatConfiguration.getFormats()); while (reporterImplementations.hasNext()) { AcceptanceTestReporter reporter = reporterImplementations.next(); LOGGER.info("Found reporter: " + reporter + "(format = " + reporter.getFormat() + ")"); if (!reporter.getFormat().isPresent() || formatConfiguration.getFormats().contains(reporter.getFormat().get())) { LOGGER.info("Registering reporter: " + reporter); reporters.add(reporter); } } return reporters; }
private void generateReportsFor(List<TestOutcome> outcomes) throws IOException { TestOutcomes allOutcomes = TestOutcomes.of(outcomes); for (TestOutcome outcome : allOutcomes.getOutcomes()) { if (shouldGenerate(OutcomeFormat.XML)) { getXMLReporter().generateReportFor(outcome, allOutcomes); } if (shouldGenerate(OutcomeFormat.JSON)) { getJsonReporter().generateReportFor(outcome, allOutcomes); } getHTMLReporter().generateReportFor(outcome, allOutcomes); } }
private void generateReportFor(final TestOutcome testOutcome, final AcceptanceTestReporter reporter) { try { LOGGER.debug(reporter + ": Generating report for test outcome: " + testOutcome.getCompleteName()); reporter.setOutputDirectory(outputDirectory); reporter.generateReportFor(testOutcome); } catch (Exception e) { throw new ReportGenerationFailedError( "Failed to generate reports using " + reporter, e); } }
public void useQualifier(final String qualifier) { for (AcceptanceTestReporter reporter : getSubscribedReporters()) { reporter.setQualifier(qualifier); } }
/** * The default reporters applicable for standard test runs. * * @return a list of default reporters. */ public static List<AcceptanceTestReporter> getDefaultReporters() { List<AcceptanceTestReporter> reporters = new ArrayList<AcceptanceTestReporter>(); FormatConfiguration formatConfiguration = new FormatConfiguration(Injectors.getInjector().getProvider(EnvironmentVariables.class).get() ); Iterator<?> reporterImplementations = Service.providers(AcceptanceTestReporter.class); LOGGER.info("Reporting formats: " + formatConfiguration.getFormats()); while (reporterImplementations.hasNext()) { AcceptanceTestReporter reporter = (AcceptanceTestReporter) reporterImplementations.next(); LOGGER.info("Found reporter: " + reporter + "(format = " + reporter.getFormat() + ")"); if (!reporter.getFormat().isPresent() || formatConfiguration.getFormats().contains(reporter.getFormat().get())) { LOGGER.info("Registering reporter: " + reporter); reporters.add(reporter); } } return reporters; }
private void generateReportFor(final TestOutcome testOutcome, final TestOutcomes allTestOutcomes, final AcceptanceTestReporter reporter) { try { LOGGER.info(reporter + ": Generating report for test outcome: " + testOutcome.getCompleteName()); reporter.setOutputDirectory(outputDirectory); reporter.generateReportFor(testOutcome, allTestOutcomes); } catch (IOException e) { throw new ReportGenerationFailedError( "Failed to generate reports using " + reporter, e); } }
public void useQualifier(final String qualifier) { for (AcceptanceTestReporter reporter : getSubscribedReporters()) { reporter.setQualifier(qualifier); } }