JenkinsのMavenでpitestを使用しています。
私のpom.xml
中で私は持っています
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.1.8</version>
<configuration>
<targetClasses>
<param>com.**********</param>
</targetClasses>
<targetTests>
<param>com.**********</param>
</targetTests>
</configuration>
</plugin>
Maven コマンド:
mvn -DwithHistory org.pitest:pitest-maven:mutationCoverage | tee mvn.log
詳細出力を有効にしました。
mvn -DwithHistory -Dverbose org.pitest:pitest-maven:mutationCoverage | tee mvn.log
次のエラーが表示されます。
Failed to execute goal org.pitest:pitest-maven:1.1.8:mutationCoverage (default-cli) on project model: Execution default-cli of goal org.pitest:pitest-maven:1.1.8:mutationCoverage failed: Coverage generation minion exited abnormally!
Maven出力にもこれがあります:
詳細ログを有効にして更新
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ********** - model 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- pitest-maven:1.1.8:mutationCoverage (default-cli) @ model ---
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Default limit mutations plugin
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /var/lib/jenkins/sharedspace/**********/model/target/classes
[INFO] Will read and write history at /tmp/com.**********.model.1.0-SNAPSHOT_pitest_history.bin
10:38:57 AM PIT >> FINE : Running report with ReportOptions [targetClasses=[^com\.**********.*$], excludedMethods=[], excludedClasses=[], codePaths=[/var/lib/jenkins/sharedspace/**********/model/target/classes], reportDir=/var/lib/jenkins/sharedspace/**********/model/target/pit-reports, historyInputLocation=/tmp/com.**********.model.1.0-SNAPSHOT_pitest_history.bin, historyOutputLocation=/tmp/com.**********.model.1.0-SNAPSHOT_pitest_history.bin, sourceDirs=[/var/lib/jenkins/sharedspace/**********/model/src/main/java, /var/lib/jenkins/sharedspace/**********/model/src/test/java], classPathElements=[/var/lib/jenkins/sharedspace/**********/model/target/test-classes, /var/lib/jenkins/sharedspace/**********/model/target/classes, /var/lib/jenkins/.m2/repository/com/**********/core/1.0-SNAPSHOT/core-1.0-SNAPSHOT.jar, /var/lib/jenkins/.m2/repository/com/**********/basics/1.0-SNAPSHOT/basics-1.0-SNAPSHOT.jar, /var/lib/jenkins/.m2/repository/com/**********/**********/1.0-SNAPSHOT/**********-1.0-SNAPSHOT.jar, /var/lib/jenkins/.m2/repository/junit/junit/4.12/junit-4.12.jar, /var/lib/jenkins/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar, /var/lib/jenkins/.m2/repository/pl/pragmatists/JUnitParams/1.0.4/JUnitParams-1.0.4.jar, /var/lib/jenkins/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar, /var/lib/jenkins/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar, /var/lib/jenkins/.m2/repository/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar, /var/lib/jenkins/.m2/repository/org/pitest/pitest/1.1.8/pitest-1.1.8.jar], mutators=[], dependencyAnalysisMaxDistance=-1, mutateStaticInitializers=false, jvmArgs=[], numberOfThreads=1, timeoutFactor=1.25, timeoutConstant=3000, targetTests=[^com\.**********.*$], loggingClasses=[], maxMutationsPerClass=-1, verbose=true, failWhenNoMutations=true, outputs=[HTML], groupConfig=TestGroupConfig [excludedGroups=[], includedGroups=[com.**********.test.annotations.type.UnitTest]], mutationUnitSize=0, shouldCreateTimestampedReports=true, detectInlinedCode=true, exportLineCoverage=false, mutationThreshold=0, coverageThreshold=0, mutationEngine=gregor, javaExecutable=null, includeLaunchClasspath=true]
10:38:57 AM PIT >> FINE : System class path is /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven32-agent-1.7.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/mvn3.2.2/boot/plexus-classworlds-2.5.1.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/mvn3.2.2/conf/logging
10:38:57 AM PIT >> FINE : Maximum available memory is 2009 mb
10:38:57 AM PIT >> FINE : MINION : Installing PIT agent
10:38:57 AM PIT >> INFO : Sending 1 test classes to minion
10:38:57 AM PIT >> INFO : Sent tests to minion
10:38:58 AM PIT >> INFO : MINION : 10:38:58 AM PIT >> INFO : Checking environment
10:38:58 AM PIT >> FINE : Expecting 1 tests classes from parent
10:38:58 AM PIT >> FINE : Tests classes received
10:38:58 AM PIT >> INFO : MINION : 10:38:58 AM PIT >> SEVERE : Error calculating coverage. Process will exit.
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:715)
at sun.ref
10:38:58 AM PIT >> INFO : MINION : lect.annotation.AnnotationParser.parseArray(AnnotationParser.java:522)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:283)
at sun.r
10:38:58 AM PIT >> INFO : MINION : eflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:117)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3281)
at java.lang.Class.getAn
10:38:58 AM PIT >> INFO : MINION : notation(Class.java:3229)
at org.pitest.junit.JUnit4SuiteFinder.apply(JUnit4SuiteFinder.java:30)
at org.pitest.junit.JUnit4SuiteFinder.apply(JUnit4SuiteFinder.java:26)
at org.pitest.extension.common.CompoundTestSuiteFinder.apply(CompoundTestSuiteFinder.
10:38:58 AM PIT >> INFO : MINION : java:20)
at org.pitest.extension.common.CompoundTestSuiteFinder.apply(CompoundTestSuiteFinder.java:9)
at org.pitest.extension.common.CompoundTestSuiteFinder.apply(CompoundTestSuiteFinder.java:20)
at org.pitest.extension.common.CompoundTestSuiteFinder.ap
10:38:58 AM PIT >> INFO : MINION : ply(CompoundTestSuiteFinder.java:9)
at org.pitest.testapi.execute.FindTestUnits.findTestUnits(FindTestUnits.java:47)
at org.pitest.testapi.execute.FindTestUnits.getTestUnits(FindTestUnits.java:40)
at org.pitest.testapi.execute.FindTestUnits.findTestUnit
10:38:58 AM PIT >> INFO : MINION : sForAllSuppliedClasses(FindTestUnits.java:29)
at org.pitest.coverage.execute.CoverageMinion.discoverTests(CoverageMinion.java:147)
at org.pitest.coverage.execute.CoverageMinion.getTestsFromParent(CoverageMinion.java:128)
at org.pitest.coverage.execute.C
10:38:58 AM PIT >> INFO : MINION : overageMinion.main(CoverageMinion.java:79)
10:38:58 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
エラーの原因となっている問題と、その解決方法を教えてください。
編集
Vagrantボックスでローカルに実行すると機能するため、おそらくJenkinsサーバーの構成の問題を確認する必要があります。どこから始めたらいいのかわからない。