Skip to content

Commit

Permalink
Merge pull request #9 from cqse/minor_fixes_for_demo
Browse files Browse the repository at this point in the history
Minor fixes for demo
  • Loading branch information
agoeb authored Sep 12, 2018
2 parents 5a60d85 + 8ff612d commit 59e7a2b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ We use [semantic versioning][semver]

# Next release

# 9.0.3
- [fix] Test Impact Mode: Empty reports are no longer dumped
- [fix] Test Impact Mode: JUnit is uploaded before testwise coverage

# 9.0.2
- [fix] prevent log files from flooding disk with default log4j config files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ private ETestExecutionResult getResult(Request request) {

@Override
public void onDump(IXmlStore store) {
if (report.isEmpty()) {
return;
}
String xml;
try {
xml = generateJUnitReport(report);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public void onTestFinish(Request request, Dump dump) {

@Override
public void onDump(IXmlStore store) {
if (testDetailsList.isEmpty()) {
return;
}
String reportString = new Gson().toJson(testDetailsList);
store.store(reportString, TEST_LIST);
testDetailsList.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ public TestImpactAgent(AgentOptions options) throws IllegalStateException, Cover
super(options);
this.options = options;
Set<EReportFormat> reportFormats = options.getHttpServerReportFormats();
if (reportFormats.contains(JUNIT)) {
testListeners.add(new JUnitReportCollector());
}
if (reportFormats.contains(TEST_LIST)) {
testListeners.add(new TestDetailsCollector());
}
if (reportFormats.contains(TESTWISE_COVERAGE)) {
testListeners.add(new TestwiseCoverageCollector(controller, options));
}
if (reportFormats.contains(JUNIT)) {
testListeners.add(new JUnitReportCollector());
}
if (reportFormats.contains(JACOCO)) {
testListeners.add(new JaCoCoCoverageCollector(options));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import eu.cqse.teamscale.jacoco.agent.ITestListener;
import eu.cqse.teamscale.jacoco.agent.JacocoRuntimeController;
import eu.cqse.teamscale.jacoco.agent.store.IXmlStore;
import eu.cqse.teamscale.report.testwise.jacoco.cache.CoverageGenerationException;
import eu.cqse.teamscale.jacoco.util.Benchmark;
import eu.cqse.teamscale.report.jacoco.dump.Dump;
import eu.cqse.teamscale.report.testwise.jacoco.TestwiseXmlReportGenerator;
import eu.cqse.teamscale.jacoco.util.Benchmark;
import eu.cqse.teamscale.report.testwise.jacoco.cache.CoverageGenerationException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import spark.Request;
Expand Down Expand Up @@ -59,6 +59,9 @@ public void onTestFinish(Request request, Dump dump) {

@Override
public void onDump(IXmlStore store) {
if (dumps.isEmpty()) {
return;
}
String xml;
try (Benchmark benchmark = new Benchmark("Generating the XML report")) {
xml = generator.convertToString(dumps);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}

ext {
appVersion = '9.0.2'
appVersion = '9.0.3'
pluginVersion = '0.1.24'
reportGeneratorVersion = '1.0.7'
teamscaleClientVersion = '0.1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public void reset() {
testCaseList.clear();
}

/** Returns whether the report contains any tests. */
public boolean isEmpty() {
return testCaseList.isEmpty();
}

/** Holds execution information for a single test case. */
public static class TestCase {

Expand Down

0 comments on commit 59e7a2b

Please sign in to comment.