Skip to content

Commit

Permalink
fix: hotfix of the executed path of parametrized tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danglotb committed Dec 5, 2018
1 parent 2866dba commit 97c5d35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ private void aggregateParametrizedTestCoverage() {
classCoverages.removeAll(subListOnSameClass);
}
final JUnit4Coverage value = new JUnit4Coverage(covered, total);
value.setExecutionPath("");
value.setExecutionPath(this.internalCoverage.getCoverageResultsMap().keySet()
.stream()
.map(this.internalCoverage.getCoverageResultsMap()::get)
.map(Coverage::getExecutionPath)
.collect(Collectors.joining("#"))
);
this.internalCoverage.getCoverageResultsMap().put(testMethodName, value);
}
);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import eu.stamp_project.testrunner.listener.CoveragePerTestMethod;
import eu.stamp_project.testrunner.listener.TestListener;
import eu.stamp_project.testrunner.runner.Failure;
import eu.stamp_project.testrunner.runner.JUnit4Runner;
import eu.stamp_project.testrunner.utils.ConstantsHelper;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -365,6 +364,7 @@ public void testOnParametrized() throws TimeoutException {
JUNIT_CP + ConstantsHelper.PATH_SEPARATOR + TEST_PROJECT_CLASSES,
"example.ParametrizedTestSuiteExample"
);
System.out.println(testListener);
assertEquals(10, testListener.getPassingTests().size());
assertEquals(0, testListener.getFailingTests().size());
}
Expand Down

0 comments on commit 97c5d35

Please sign in to comment.