Skip to content

Commit

Permalink
failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoles committed Nov 1, 2024
1 parent be303c6 commit 6ffc319
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
40 changes: 25 additions & 15 deletions pitest-maven-verification/src/test/java/org/pitest/PitMojoIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,21 +360,6 @@ public void shouldWorkWithGWTMockito() throws Exception {
assertThat(actual).doesNotContain("status='RUN_ERROR'");
}

@Test
@Ignore("yatspec is not available on maven central. Repo currently down")
public void shouldWorkWithYatspec() throws Exception {
File testDir = prepare("/pit-263-yatspec");
verifier.executeGoal("test");
verifier.executeGoal("org.pitest:pitest-maven:mutationCoverage");

String actual = readResults(testDir);
assertThat(actual)
.contains(
"<mutation detected='true' status='KILLED' numberOfTestsRun='1'><sourceFile>SomeClass.java</sourceFile>");
assertThat(actual).doesNotContain("status='NO_COVERAGE'");
assertThat(actual).doesNotContain("status='RUN_ERROR'");
}

@Test
// note this test depends on the junit5 plugin
public void shouldWorkWithQuarkus() throws Exception {
Expand Down Expand Up @@ -465,6 +450,31 @@ public void resolvesCorrectFilesForKotlinMultiModules() throws Exception {

}

@Test
public void handlesTestsInSeparateModulesWhenConfigured()
throws Exception {
File testDir = prepare("/pit-cross-module-tests");

verifier.executeGoal("test");
verifier.executeGoal("org.pitest:pitest-maven:mutationCoverage");

verifier.executeGoal("org.pitest:pitest-maven:report-aggregate-module");

File siteParentDir = buildFilePath(testDir, "target", "pit-reports");
assertThat(buildFilePath(siteParentDir, "index.html")).exists();
String projectReportsHtmlContents = FileUtils
.readFileToString(buildFilePath(testDir, "target", "pit-reports",
"index.html"));

assertTrue("miss data of subModule 1",
projectReportsHtmlContents
.contains("<a href=\"./org.example1/index.html\">org.example1</a>"));

assertTrue("coverage included",
projectReportsHtmlContents
.contains("85%"));
}

private void runForJava8Only() {
String javaVersion = System.getProperty("java.version");
assumeTrue(javaVersion.startsWith("1.8"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
</outputFormats>
<!-- exportLineCoverage is used by the report aggregate -->
<exportLineCoverage>true</exportLineCoverage>
<aggregatedTestStrengthThreshold>26</aggregatedTestStrengthThreshold>
<aggregatedMutationThreshold>20</aggregatedMutationThreshold>
<aggregatedMaxSurviving>6</aggregatedMaxSurviving>

</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 6ffc319

Please sign in to comment.