diff --git a/jbang-scripts/FlakyTestRunSummarizer.java b/jbang-scripts/FlakyTestRunSummarizer.java new file mode 100644 index 0000000..47d959d --- /dev/null +++ b/jbang-scripts/FlakyTestRunSummarizer.java @@ -0,0 +1,16 @@ +//usr/bin/env jbang "$0" "$@" ; exit $? + +//DEPS io.quarkus.qe:flaky-run-reporter:0.1.1.Beta1-SNAPSHOT + +import io.quarkus.qe.reporter.flakyrun.summary.FlakyRunSummaryReporter; + +public class FlakyTestRunSummarizer { + public static void main(String... args) { + try { + new FlakyRunSummaryReporter(args).createReport(); + System.exit(0); + } catch (Exception e) { + System.exit(1); + } + } +} diff --git a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReportingMavenExtension.java b/src/main/java/io/quarkus/qe/reporter/flakyrun/mavenextension/FlakyRunReportingMavenExtension.java similarity index 84% rename from src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReportingMavenExtension.java rename to src/main/java/io/quarkus/qe/reporter/flakyrun/mavenextension/FlakyRunReportingMavenExtension.java index e284b5f..a6fc0fe 100644 --- a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReportingMavenExtension.java +++ b/src/main/java/io/quarkus/qe/reporter/flakyrun/mavenextension/FlakyRunReportingMavenExtension.java @@ -1,5 +1,6 @@ -package io.quarkus.qe.reporter.flakyrun; +package io.quarkus.qe.reporter.flakyrun.mavenextension; +import io.quarkus.qe.reporter.flakyrun.reporter.FlakyRunReporter; import org.apache.maven.AbstractMavenLifecycleParticipant; import org.apache.maven.execution.MavenSession; import org.codehaus.plexus.component.annotations.Component; diff --git a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReporter.java b/src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyRunReporter.java similarity index 97% rename from src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReporter.java rename to src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyRunReporter.java index 917e193..dd885b8 100644 --- a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyRunReporter.java +++ b/src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyRunReporter.java @@ -1,4 +1,4 @@ -package io.quarkus.qe.reporter.flakyrun; +package io.quarkus.qe.reporter.flakyrun.reporter; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -29,7 +29,7 @@ public class FlakyRunReporter { private static final Path MAVEN_FAILSAFE_REPORTS_PATH = Path.of(TARGET_DIR, "failsafe-reports"); private final Logger logger; - FlakyRunReporter(Logger logger) { + public FlakyRunReporter(Logger logger) { this.logger = logger; } diff --git a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyTest.java b/src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyTest.java similarity index 96% rename from src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyTest.java rename to src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyTest.java index ae5e42c..07a6f1d 100644 --- a/src/main/java/io/quarkus/qe/reporter/flakyrun/FlakyTest.java +++ b/src/main/java/io/quarkus/qe/reporter/flakyrun/reporter/FlakyTest.java @@ -1,4 +1,4 @@ -package io.quarkus.qe.reporter.flakyrun; +package io.quarkus.qe.reporter.flakyrun.reporter; import io.quarkus.bot.build.reporting.model.ProjectReport; import org.apache.maven.plugins.surefire.report.ReportTestCase; diff --git a/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummary.java b/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummary.java new file mode 100644 index 0000000..21c14f3 --- /dev/null +++ b/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummary.java @@ -0,0 +1,11 @@ +package io.quarkus.qe.reporter.flakyrun.summary; + +import java.util.List; + +public record FlakyRunSummary(String projectName, String projectBaseDir, String testFullName, + List flakes) { + + public record FlakyRunSummaryItem(String failureMessage, String failureType, String failureStackTrace, + String dateTime) { + } +} diff --git a/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummaryReporter.java b/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummaryReporter.java new file mode 100644 index 0000000..d351886 --- /dev/null +++ b/src/main/java/io/quarkus/qe/reporter/flakyrun/summary/FlakyRunSummaryReporter.java @@ -0,0 +1,14 @@ +package io.quarkus.qe.reporter.flakyrun.summary; + +public class FlakyRunSummaryReporter { + public FlakyRunSummaryReporter(String[] args) { + // FIXME impl. me! + for (String arg : args) { + System.out.println("system arg is " + arg); + } + } + + public void createReport() { + + } +}