Skip to content

Commit 6ffc319

Browse files
committed
failing test
1 parent be303c6 commit 6ffc319

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

pitest-maven-verification/src/test/java/org/pitest/PitMojoIT.java

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -360,21 +360,6 @@ public void shouldWorkWithGWTMockito() throws Exception {
360360
assertThat(actual).doesNotContain("status='RUN_ERROR'");
361361
}
362362

363-
@Test
364-
@Ignore("yatspec is not available on maven central. Repo currently down")
365-
public void shouldWorkWithYatspec() throws Exception {
366-
File testDir = prepare("/pit-263-yatspec");
367-
verifier.executeGoal("test");
368-
verifier.executeGoal("org.pitest:pitest-maven:mutationCoverage");
369-
370-
String actual = readResults(testDir);
371-
assertThat(actual)
372-
.contains(
373-
"<mutation detected='true' status='KILLED' numberOfTestsRun='1'><sourceFile>SomeClass.java</sourceFile>");
374-
assertThat(actual).doesNotContain("status='NO_COVERAGE'");
375-
assertThat(actual).doesNotContain("status='RUN_ERROR'");
376-
}
377-
378363
@Test
379364
// note this test depends on the junit5 plugin
380365
public void shouldWorkWithQuarkus() throws Exception {
@@ -465,6 +450,31 @@ public void resolvesCorrectFilesForKotlinMultiModules() throws Exception {
465450

466451
}
467452

453+
@Test
454+
public void handlesTestsInSeparateModulesWhenConfigured()
455+
throws Exception {
456+
File testDir = prepare("/pit-cross-module-tests");
457+
458+
verifier.executeGoal("test");
459+
verifier.executeGoal("org.pitest:pitest-maven:mutationCoverage");
460+
461+
verifier.executeGoal("org.pitest:pitest-maven:report-aggregate-module");
462+
463+
File siteParentDir = buildFilePath(testDir, "target", "pit-reports");
464+
assertThat(buildFilePath(siteParentDir, "index.html")).exists();
465+
String projectReportsHtmlContents = FileUtils
466+
.readFileToString(buildFilePath(testDir, "target", "pit-reports",
467+
"index.html"));
468+
469+
assertTrue("miss data of subModule 1",
470+
projectReportsHtmlContents
471+
.contains("<a href=\"./org.example1/index.html\">org.example1</a>"));
472+
473+
assertTrue("coverage included",
474+
projectReportsHtmlContents
475+
.contains("85%"));
476+
}
477+
468478
private void runForJava8Only() {
469479
String javaVersion = System.getProperty("java.version");
470480
assumeTrue(javaVersion.startsWith("1.8"));

pitest-maven-verification/src/test/resources/pit-cross-module-tests/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
</outputFormats>
4242
<!-- exportLineCoverage is used by the report aggregate -->
4343
<exportLineCoverage>true</exportLineCoverage>
44-
<aggregatedTestStrengthThreshold>26</aggregatedTestStrengthThreshold>
45-
<aggregatedMutationThreshold>20</aggregatedMutationThreshold>
46-
<aggregatedMaxSurviving>6</aggregatedMaxSurviving>
44+
4745
</configuration>
4846
</plugin>
4947
</plugins>

0 commit comments

Comments
 (0)