diff --git a/src/functionalTest/java/org.scoverage/ScalaMultiModuleCrossVersionTest.java b/src/functionalTest/java/org.scoverage/ScalaMultiModuleCrossVersionTest.java index 401149a..22ef656 100644 --- a/src/functionalTest/java/org.scoverage/ScalaMultiModuleCrossVersionTest.java +++ b/src/functionalTest/java/org.scoverage/ScalaMultiModuleCrossVersionTest.java @@ -5,6 +5,10 @@ import java.io.File; +/** + * Note that it is important to test the case of all of the modules together, + * along with the cases of each module individually, as they behave differently. + */ public class ScalaMultiModuleCrossVersionTest extends ScoverageFunctionalTest { public ScalaMultiModuleCrossVersionTest() { @@ -12,7 +16,7 @@ public ScalaMultiModuleCrossVersionTest() { } @Test - public void checkAndAggregateScoverage() throws Exception { + public void checkAndAggregateAll() throws Exception { AssertableBuildResult result = run("clean", ScoveragePlugin.getCHECK_NAME(), ScoveragePlugin.getAGGREGATE_NAME()); @@ -20,15 +24,41 @@ public void checkAndAggregateScoverage() throws Exception { result.assertTaskSkipped(ScoveragePlugin.getREPORT_NAME()); result.assertTaskSucceeded("2_11:" + ScoveragePlugin.getREPORT_NAME()); result.assertTaskSucceeded("2_12:" + ScoveragePlugin.getREPORT_NAME()); + result.assertTaskSucceeded("2_13:" + ScoveragePlugin.getREPORT_NAME()); result.assertTaskSucceeded(ScoveragePlugin.getCHECK_NAME()); result.assertTaskSucceeded("2_11:" + ScoveragePlugin.getCHECK_NAME()); result.assertTaskSucceeded("2_12:" + ScoveragePlugin.getCHECK_NAME()); + result.assertTaskSucceeded("2_13:" + ScoveragePlugin.getCHECK_NAME()); result.assertTaskSucceeded(ScoveragePlugin.getAGGREGATE_NAME()); assertAllReportFilesExist(); assertCoverage(100.0); } + @Test + public void report211() throws Exception { + + AssertableBuildResult result = run("clean", ":2_11:" + ScoveragePlugin.getREPORT_NAME()); + result.assertTaskSucceeded("2_11:" + ScoveragePlugin.getREPORT_NAME()); + assert211ReportFilesExist(); + } + + @Test + public void report212() throws Exception { + + AssertableBuildResult result = run("clean", ":2_12:" + ScoveragePlugin.getREPORT_NAME()); + result.assertTaskSucceeded("2_12:" + ScoveragePlugin.getREPORT_NAME()); + assert212ReportFilesExist(); + } + + @Test + public void report213() throws Exception { + + AssertableBuildResult result = run("clean", ":2_13:" + ScoveragePlugin.getREPORT_NAME()); + result.assertTaskSucceeded("2_13:" + ScoveragePlugin.getREPORT_NAME()); + assert213ReportFilesExist(); + } + private void assertAllReportFilesExist() { assert211ReportFilesExist(); @@ -42,6 +72,7 @@ private void assertAggregationFilesExist() { Assert.assertTrue(resolve(reportDir(), "index.html").exists()); Assert.assertTrue(resolve(reportDir(), "2_11/src/main/scala/org/hello/World211.scala.html").exists()); Assert.assertTrue(resolve(reportDir(), "2_12/src/main/scala/org/hello/World212.scala.html").exists()); + Assert.assertTrue(resolve(reportDir(), "2_13/src/main/scala/org/hello/World213.scala.html").exists()); } private void assert211ReportFilesExist() { diff --git a/src/functionalTest/resources/projects/scala-multi-module-cross-version/build.gradle b/src/functionalTest/resources/projects/scala-multi-module-cross-version/build.gradle index 6f7d74c..8577cf5 100644 --- a/src/functionalTest/resources/projects/scala-multi-module-cross-version/build.gradle +++ b/src/functionalTest/resources/projects/scala-multi-module-cross-version/build.gradle @@ -32,8 +32,4 @@ allprojects { scoverage { minimumRate = 0.5 -} - -project(":2_11").tasks.reportScoverage - .mustRunAfter(project(":2_12").tasks.reportScoverage) - .mustRunAfter(project(":2_13").tasks.reportScoverage) \ No newline at end of file +} \ No newline at end of file