dspot icon indicating copy to clipboard operation
dspot copied to clipboard

Does it work with jdk 11 and Junit5?

Open tomasalmeida opened this issue 4 years ago • 4 comments

I am trying to configure this plugin with https://github.com/tomasalmeida/mutant-testing/tree/feature/stamp-project, but it says jdk 11 is not supported:

$ java -jar dspot-3.1.0-jar-with-dependencies.jar --absolute-path-to-project-root text-analysis/ --verbose
...
WARN] 2020-01-27 23:15:02 ErrorReport - DSpot encountered 1 error(s) during amplification.
Something bad happened when DSpot tried to computed the original mutation score.
This is usually due to the value of the command line option --pit-filter-classes-to-keep.
Specify the filter of classes to keep used by PIT. This allow you restrict the scope of the mutation done by PIT. If this is not specified, DSpot will try to build on the fly a filter that takes into account the largest number of classes, e.g. the topest package.
This is can be also due to a specific configuration of your test suite. If any test fails,
PIT (and so DSpot) won't be able to be executed. Please, check your environment variables,
external files, etc. You can use --excluded-classes and --excluded-test-cases
 to exclude respectively specific test classes ans test cases.
java.lang.RuntimeException: java.lang.RuntimeException: Maven build failed! Enable verbose mode for more information (--verbose)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:155)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:161)
	at eu.stamp_project.dspot.selector.PitMutantScoreSelector.init(PitMutantScoreSelector.java:109)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.firstSelectorSetup(AmplificationSetup.java:124)
	at eu.stamp_project.dspot.DSpot.onlyAssertionGeneration(DSpot.java:72)
	at eu.stamp_project.dspot.DSpot.amplification(DSpot.java:61)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:53)
	at eu.stamp_project.Main.main(Main.java:20)
Caused by: java.lang.RuntimeException: Maven build failed! Enable verbose mode for more information (--verbose)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:152)
	... 7 more

[INFO] 2020-01-27 23:15:02 OutputReport - The amplification ends up with 0 amplified test methods over 1 test classes.
[INFO] 2020-01-27 23:15:02 OutputReport - Print demo.text.analysis.BalancedBracketsValidatorTest.java with 0 amplified test cases in target/dspot/output//original/

errors_report.txt

$ cat target/dspot/output/errors_report.txt
DSpot encountered 1 error(s) during amplification.
Something bad happened when DSpot tried to computed the original mutation score.
This is usually due to the value of the command line option --pit-filter-classes-to-keep.
Specify the filter of classes to keep used by PIT. This allow you restrict the scope of the mutation done by PIT. If this is not specified, DSpot will try to build on the fly a filter that takes into account the largest number of classes, e.g. the topest package.
This is can be also due to a specific configuration of your test suite. If any test fails,
PIT (and so DSpot) won't be able to be executed. Please, check your environment variables,
external files, etc. You can use --excluded-classes and --excluded-test-cases
 to exclude respectively specific test classes ans test cases.
java.lang.RuntimeException: java.lang.RuntimeException: Maven build failed! Enable verbose mode for more information (--verbose)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:155)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:161)
	at eu.stamp_project.dspot.selector.PitMutantScoreSelector.init(PitMutantScoreSelector.java:109)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.firstSelectorSetup(AmplificationSetup.java:124)
	at eu.stamp_project.dspot.DSpot.onlyAssertionGeneration(DSpot.java:72)
	at eu.stamp_project.dspot.DSpot.amplification(DSpot.java:61)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:53)
	at eu.stamp_project.Main.main(Main.java:20)
Caused by: java.lang.RuntimeException: Maven build failed! Enable verbose mode for more information (--verbose)
	at eu.stamp_project.dspot.common.automaticbuilder.maven.MavenAutomaticBuilder.runPit(MavenAutomaticBuilder.java:152)

tomasalmeida avatar Jan 27 '20 22:01 tomasalmeida

Hello @tomasalmeida

Honestly, I never tried it using java 11 but I doubt a lot it would work.

I will try on my side and keep you updated.

Thank you.

danglotb avatar Feb 06 '20 09:02 danglotb

I also have a problem with java 11. Im using env MAVEN_HOME=/opt/maven/ JAVA_HOME=/usr/lib/jvm/default mvn eu.stamp-project:dspot-maven:amplify-unit-tests -Dtest-criterion=JacocoCoverageSelector on https://github.com/condorcat/de.serra.condorcat

I get the following errors

[serra@archlinux de.serra.condorcat]$ env MAVEN_HOME=/opt/maven/ JAVA_HOME=/usr/lib/jvm/default mvn eu.stamp-project:dspot-maven:amplify-unit-tests -Dtest-criterion=JacocoCoverageSelector
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< de.serra:condorcat >-------------------------
[INFO] Building takes-condorcat 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- dspot-maven:3.1.0:amplify-unit-tests (default-cli) @ condorcat ---
[INFO] Using /home/serra/dev/de.serra.condorcat/pom.xml to run maven.
[INFO] Using /opt/maven for maven home
[INFO] run maven: /opt/maven/bin/mvn clean test -DskipTests dependency:build-classpath -Dmdep.outputFile=target/dspot/classpath
[WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] Cache 'frameworkCache' created in EhcacheManager.
[INFO] Path to runner Classes: /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/org/jacoco/org.jacoco.core/0.7.9/org.jacoco.core-0.7.9.jar
[INFO] /home/serra/.m2/repository/org/ow2/asm/asm-debug-all/5.2/asm-debug-all-5.2.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] /home/serra/.m2/repository/eu/stamp-project/test-runner/2.1.1/test-runner-2.1.1-jar-with-dependencies.jar
[INFO] Amplification of de.serra.condorcat.CondorcatIntegrationTest (2 test(s))
[INFO] Assertion amplification of de.serra.condorcat.CondorcatIntegrationTest (2 test(s))
[INFO] Compiling with -proceedOnError -encoding UTF-8 -cp /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources:/home/serra/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/serra/.m2/repository/com/eclipsesource/minimal-json/minimal-json/0.9.5/minimal-json-0.9.5.jar:/home/serra/.m2/repository/com/fizzed/rocker-runtime/1.2.2/rocker-runtime-1.2.2.jar:/home/serra/.m2/repository/de/serra/ballot/0.0.2/ballot-0.0.2.jar:/home/serra/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/home/serra/.m2/repository/org/slf4j/slf4j-jdk14/1.7.30/slf4j-jdk14-1.7.30.jar:/home/serra/.m2/repository/org/takes/takes/1.19/takes-1.19.jar:/home/serra/.m2/repository/org/cactoos/cactoos/0.42/cactoos-0.42.jar:/home/serra/.m2/repository/org/apache/commons/commons-text/1.4/commons-text-1.4.jar:/home/serra/.m2/repository/org/webjars/js-cookie/2.2.1/js-cookie-2.2.1.jar:/home/serra/.m2/repository/org/webjars/webjars-locator-core/0.43/webjars-locator-core-0.43.jar:/home/serra/.m2/repository/io/github/classgraph/classgraph/4.8.53/classgraph-4.8.53.jar:/home/serra/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/home/serra/.m2/repository/com/google/code/findbugs/findbugs-annotations/3.0.1/findbugs-annotations-3.0.1.jar:/home/serra/.m2/repository/org/immutables/value/2.8.3/value-2.8.3.jar:/home/serra/.m2/repository/org/projectlombok/lombok/1.18.10/lombok-1.18.10.jar:/home/serra/.m2/repository/org/webjars/npm/github-com-yegor256-tacit/1.5.0/github-com-yegor256-tacit-1.5.0.jar:/home/serra/.m2/repository/com/jcabi/jcabi-matchers/1.4/jcabi-matchers-1.4.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-log/0.17.2/jcabi-log-0.17.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar:/home/serra/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.jar:/home/serra/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar:/home/serra/.m2/repository/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.jar:/home/serra/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.jar:/home/serra/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/home/serra/.m2/repository/com/jcabi/jcabi-w3c/1.3/jcabi-w3c-1.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-xml/0.17.2/jcabi-xml-0.17.2.jar:/home/serra/.m2/repository/com/jcabi/jcabi-immutable/1.4/jcabi-immutable-1.4.jar:/home/serra/.m2/repository/com/jcabi/jcabi-http/1.10.2/jcabi-http-1.10.2.jar:/home/serra/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/home/serra/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/serra/.m2/repository/com/jcabi/jcabi-aspects/0.22.5/jcabi-aspects-0.22.5.jar:/home/serra/.m2/repository/org/aspectj/aspectjrt/1.8.7/aspectjrt-1.8.7.jar:/home/serra/.m2/repository/com/jcabi/jcabi-manifests/1.1/jcabi-manifests-1.1.jar:/home/serra/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/serra/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar:/home/serra/.m2/repository/net/jqwik/jqwik/1.2.3/jqwik-1.2.3.jar:/home/serra/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/home/serra/.m2/repository/net/jqwik/jqwik-api/1.2.3/jqwik-api-1.2.3.jar:/home/serra/.m2/repository/net/jqwik/jqwik-engine/1.2.3/jqwik-engine-1.2.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar:/home/serra/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/serra/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/serra/.m2/repository/org/glassfish/jersey/core/jersey-common/2.30/jersey-common-2.30.jar:/home/serra/.m2/repository/jakarta/ws/rs/jakarta.ws.rs-api/2.1.6/jakarta.ws.rs-api-2.1.6.jar:/home/serra/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/home/serra/.m2/repository/org/glassfish/hk2/external/jakarta.inject/2.6.1/jakarta.inject-2.6.1.jar:/home/serra/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.3/osgi-resource-locator-1.0.3.jar:/home/serra/.m2/repository/com/sun/activation/jakarta.activation/1.2.1/jakarta.activation-1.2.1.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.6.0/junit-jupiter-api-5.6.0.jar:/home/serra/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-commons/1.6.0/junit-platform-commons-1.6.0.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.6.0/junit-jupiter-engine-5.6.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-engine/1.6.0/junit-platform-engine-1.6.0.jar:/home/serra/.m2/repository/com/fizzed/rocker-compiler/1.2.2/rocker-compiler-1.2.2.jar:/home/serra/.m2/repository/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar:/home/serra/dev/de.serra.condorcat/target/classes:/home/serra/dev/de.serra.condorcat/target/test-classes:/home/serra/dev/de.serra.condorcat//target/dspot/dependencies/: -d /home/serra/dev/de.serra.condorcat/target/test-classes -1.8 -preserveAllLocals -noExit -enableJavadoc -proc:none /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources/de/serra/condorcat/CondorcatIntegrationTest.java
[ERROR] Error(s) during compilation:
[ERROR] Pb(2) de.serra.condorcat.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.var cannot be resolved to a type
[INFO] Compiling with -proceedOnError -encoding UTF-8 -cp /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources:/home/serra/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/serra/.m2/repository/com/eclipsesource/minimal-json/minimal-json/0.9.5/minimal-json-0.9.5.jar:/home/serra/.m2/repository/com/fizzed/rocker-runtime/1.2.2/rocker-runtime-1.2.2.jar:/home/serra/.m2/repository/de/serra/ballot/0.0.2/ballot-0.0.2.jar:/home/serra/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/home/serra/.m2/repository/org/slf4j/slf4j-jdk14/1.7.30/slf4j-jdk14-1.7.30.jar:/home/serra/.m2/repository/org/takes/takes/1.19/takes-1.19.jar:/home/serra/.m2/repository/org/cactoos/cactoos/0.42/cactoos-0.42.jar:/home/serra/.m2/repository/org/apache/commons/commons-text/1.4/commons-text-1.4.jar:/home/serra/.m2/repository/org/webjars/js-cookie/2.2.1/js-cookie-2.2.1.jar:/home/serra/.m2/repository/org/webjars/webjars-locator-core/0.43/webjars-locator-core-0.43.jar:/home/serra/.m2/repository/io/github/classgraph/classgraph/4.8.53/classgraph-4.8.53.jar:/home/serra/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/home/serra/.m2/repository/com/google/code/findbugs/findbugs-annotations/3.0.1/findbugs-annotations-3.0.1.jar:/home/serra/.m2/repository/org/immutables/value/2.8.3/value-2.8.3.jar:/home/serra/.m2/repository/org/projectlombok/lombok/1.18.10/lombok-1.18.10.jar:/home/serra/.m2/repository/org/webjars/npm/github-com-yegor256-tacit/1.5.0/github-com-yegor256-tacit-1.5.0.jar:/home/serra/.m2/repository/com/jcabi/jcabi-matchers/1.4/jcabi-matchers-1.4.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-log/0.17.2/jcabi-log-0.17.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar:/home/serra/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.jar:/home/serra/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar:/home/serra/.m2/repository/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.jar:/home/serra/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.jar:/home/serra/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/home/serra/.m2/repository/com/jcabi/jcabi-w3c/1.3/jcabi-w3c-1.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-xml/0.17.2/jcabi-xml-0.17.2.jar:/home/serra/.m2/repository/com/jcabi/jcabi-immutable/1.4/jcabi-immutable-1.4.jar:/home/serra/.m2/repository/com/jcabi/jcabi-http/1.10.2/jcabi-http-1.10.2.jar:/home/serra/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/home/serra/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/serra/.m2/repository/com/jcabi/jcabi-aspects/0.22.5/jcabi-aspects-0.22.5.jar:/home/serra/.m2/repository/org/aspectj/aspectjrt/1.8.7/aspectjrt-1.8.7.jar:/home/serra/.m2/repository/com/jcabi/jcabi-manifests/1.1/jcabi-manifests-1.1.jar:/home/serra/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/serra/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar:/home/serra/.m2/repository/net/jqwik/jqwik/1.2.3/jqwik-1.2.3.jar:/home/serra/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/home/serra/.m2/repository/net/jqwik/jqwik-api/1.2.3/jqwik-api-1.2.3.jar:/home/serra/.m2/repository/net/jqwik/jqwik-engine/1.2.3/jqwik-engine-1.2.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar:/home/serra/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/serra/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/serra/.m2/repository/org/glassfish/jersey/core/jersey-common/2.30/jersey-common-2.30.jar:/home/serra/.m2/repository/jakarta/ws/rs/jakarta.ws.rs-api/2.1.6/jakarta.ws.rs-api-2.1.6.jar:/home/serra/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/home/serra/.m2/repository/org/glassfish/hk2/external/jakarta.inject/2.6.1/jakarta.inject-2.6.1.jar:/home/serra/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.3/osgi-resource-locator-1.0.3.jar:/home/serra/.m2/repository/com/sun/activation/jakarta.activation/1.2.1/jakarta.activation-1.2.1.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.6.0/junit-jupiter-api-5.6.0.jar:/home/serra/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-commons/1.6.0/junit-platform-commons-1.6.0.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.6.0/junit-jupiter-engine-5.6.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-engine/1.6.0/junit-platform-engine-1.6.0.jar:/home/serra/.m2/repository/com/fizzed/rocker-compiler/1.2.2/rocker-compiler-1.2.2.jar:/home/serra/.m2/repository/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar:/home/serra/dev/de.serra.condorcat/target/classes:/home/serra/dev/de.serra.condorcat/target/test-classes:/home/serra/dev/de.serra.condorcat//target/dspot/dependencies/: -d /home/serra/dev/de.serra.condorcat/target/test-classes -1.8 -preserveAllLocals -noExit -enableJavadoc -proc:none /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources/de/serra/condorcat/CondorcatIntegrationTest.java
eu.stamp_project.dspot.common.miscellaneous.AmplificationException: Every test methods are uncompilable
	at eu.stamp_project.dspot.common.compilation.TestCompiler.compileAndDiscardUncompilableMethods(TestCompiler.java:182)
	at eu.stamp_project.dspot.common.compilation.TestCompiler.compileAndRun(TestCompiler.java:154)
	at eu.stamp_project.dspot.common.compilation.TestCompiler.compileRunAndDiscardUncompilableAndFailingTestMethods(TestCompiler.java:88)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.firstSelectorSetup(AmplificationSetup.java:129)
	at eu.stamp_project.dspot.DSpot.onlyAssertionGeneration(DSpot.java:72)
	at eu.stamp_project.dspot.DSpot.amplification(DSpot.java:61)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:53)
	at eu.stamp_project.Main.main(Main.java:20)
	at eu.stamp_project.DSpotMojo.execute(DSpotMojo.java:29)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[WARNING] Something bad happened during selection before amplification.
java.lang.RuntimeException: java.io.FileNotFoundException: /home/serra/dev/de.serra.condorcat/target/dspot/Coverage.ser does not exist.
	at eu.stamp_project.testrunner.runner.Loader.load(Loader.java:25)
	at eu.stamp_project.testrunner.listener.impl.CoverageImpl.load(CoverageImpl.java:151)
	at eu.stamp_project.testrunner.EntryPoint.runCoverage(EntryPoint.java:345)
	at eu.stamp_project.testrunner.EntryPoint.runCoverage(EntryPoint.java:309)
	at eu.stamp_project.testrunner.EntryPoint.runCoverage(EntryPoint.java:255)
	at eu.stamp_project.dspot.selector.JacocoCoverageSelector.selectToAmplify(JacocoCoverageSelector.java:68)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.firstSelectorSetup(AmplificationSetup.java:139)
	at eu.stamp_project.dspot.DSpot.onlyAssertionGeneration(DSpot.java:72)
	at eu.stamp_project.dspot.DSpot.amplification(DSpot.java:61)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:53)
	at eu.stamp_project.Main.main(Main.java:20)
	at eu.stamp_project.DSpotMojo.execute(DSpotMojo.java:29)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.io.FileNotFoundException: /home/serra/dev/de.serra.condorcat/target/dspot/Coverage.ser does not exist.
	... 34 more

[INFO] elapsedTime 1188
java.lang.NullPointerException
	at eu.stamp_project.dspot.selector.JacocoCoverageSelector.report(JacocoCoverageSelector.java:174)
	at eu.stamp_project.dspot.common.configuration.AmplificationSetup.postAmplification(AmplificationSetup.java:83)
	at eu.stamp_project.dspot.DSpot.run(DSpot.java:54)
	at eu.stamp_project.Main.main(Main.java:20)
	at eu.stamp_project.DSpotMojo.execute(DSpotMojo.java:29)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] Something bad happened during the report fot test-criterion.
[ERROR] Dspot might not have output correctly!
[WARNING] DSpot could not obtain any amplified test method.
[WARNING] You can customize the following options: --amplifiers, --test-criterion, --iteration, --inputAmplDistributor etc, and retry with a new configuration.
[INFO] Amplification of de.serra.condorcat.createballot.CreateBallotIntegrationTest (2 test(s))
[INFO] Assertion amplification of de.serra.condorcat.createballot.CreateBallotIntegrationTest (2 test(s))
[INFO] Compiling with -proceedOnError -encoding UTF-8 -cp /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources:/home/serra/.m2/repository/junit/junit/4.12/junit-4.12.jar:/home/serra/.m2/repository/com/eclipsesource/minimal-json/minimal-json/0.9.5/minimal-json-0.9.5.jar:/home/serra/.m2/repository/com/fizzed/rocker-runtime/1.2.2/rocker-runtime-1.2.2.jar:/home/serra/.m2/repository/de/serra/ballot/0.0.2/ballot-0.0.2.jar:/home/serra/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/home/serra/.m2/repository/org/slf4j/slf4j-jdk14/1.7.30/slf4j-jdk14-1.7.30.jar:/home/serra/.m2/repository/org/takes/takes/1.19/takes-1.19.jar:/home/serra/.m2/repository/org/cactoos/cactoos/0.42/cactoos-0.42.jar:/home/serra/.m2/repository/org/apache/commons/commons-text/1.4/commons-text-1.4.jar:/home/serra/.m2/repository/org/webjars/js-cookie/2.2.1/js-cookie-2.2.1.jar:/home/serra/.m2/repository/org/webjars/webjars-locator-core/0.43/webjars-locator-core-0.43.jar:/home/serra/.m2/repository/io/github/classgraph/classgraph/4.8.53/classgraph-4.8.53.jar:/home/serra/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/home/serra/.m2/repository/com/google/code/findbugs/findbugs-annotations/3.0.1/findbugs-annotations-3.0.1.jar:/home/serra/.m2/repository/org/immutables/value/2.8.3/value-2.8.3.jar:/home/serra/.m2/repository/org/projectlombok/lombok/1.18.10/lombok-1.18.10.jar:/home/serra/.m2/repository/org/webjars/npm/github-com-yegor256-tacit/1.5.0/github-com-yegor256-tacit-1.5.0.jar:/home/serra/.m2/repository/com/jcabi/jcabi-matchers/1.4/jcabi-matchers-1.4.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/home/serra/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-log/0.17.2/jcabi-log-0.17.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar:/home/serra/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar:/home/serra/.m2/repository/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.jar:/home/serra/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar:/home/serra/.m2/repository/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.jar:/home/serra/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.jar:/home/serra/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/home/serra/.m2/repository/com/jcabi/jcabi-w3c/1.3/jcabi-w3c-1.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpmime/4.3/httpmime-4.3.jar:/home/serra/.m2/repository/com/jcabi/jcabi-xml/0.17.2/jcabi-xml-0.17.2.jar:/home/serra/.m2/repository/com/jcabi/jcabi-immutable/1.4/jcabi-immutable-1.4.jar:/home/serra/.m2/repository/com/jcabi/jcabi-http/1.10.2/jcabi-http-1.10.2.jar:/home/serra/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/home/serra/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/serra/.m2/repository/com/jcabi/jcabi-aspects/0.22.5/jcabi-aspects-0.22.5.jar:/home/serra/.m2/repository/org/aspectj/aspectjrt/1.8.7/aspectjrt-1.8.7.jar:/home/serra/.m2/repository/com/jcabi/jcabi-manifests/1.1/jcabi-manifests-1.1.jar:/home/serra/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar:/home/serra/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar:/home/serra/.m2/repository/net/jqwik/jqwik/1.2.3/jqwik-1.2.3.jar:/home/serra/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/home/serra/.m2/repository/net/jqwik/jqwik-api/1.2.3/jqwik-api-1.2.3.jar:/home/serra/.m2/repository/net/jqwik/jqwik-engine/1.2.3/jqwik-engine-1.2.3.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.jar:/home/serra/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar:/home/serra/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/serra/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/home/serra/.m2/repository/org/glassfish/jersey/core/jersey-common/2.30/jersey-common-2.30.jar:/home/serra/.m2/repository/jakarta/ws/rs/jakarta.ws.rs-api/2.1.6/jakarta.ws.rs-api-2.1.6.jar:/home/serra/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/home/serra/.m2/repository/org/glassfish/hk2/external/jakarta.inject/2.6.1/jakarta.inject-2.6.1.jar:/home/serra/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.3/osgi-resource-locator-1.0.3.jar:/home/serra/.m2/repository/com/sun/activation/jakarta.activation/1.2.1/jakarta.activation-1.2.1.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.6.0/junit-jupiter-api-5.6.0.jar:/home/serra/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-commons/1.6.0/junit-platform-commons-1.6.0.jar:/home/serra/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.6.0/junit-jupiter-engine-5.6.0.jar:/home/serra/.m2/repository/org/junit/platform/junit-platform-engine/1.6.0/junit-platform-engine-1.6.0.jar:/home/serra/.m2/repository/com/fizzed/rocker-compiler/1.2.2/rocker-compiler-1.2.2.jar:/home/serra/.m2/repository/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar:/home/serra/dev/de.serra.condorcat/target/classes:/home/serra/dev/de.serra.condorcat/target/test-classes:/home/serra/dev/de.serra.condorcat//target/dspot/dependencies/: -d /home/serra/dev/de.serra.condorcat/target/test-classes -1.8 -preserveAllLocals -noExit -enableJavadoc -proc:none /home/serra/dev/de.serra.condorcat/target/dspot/tmp_test_sources/de/serra/condorcat/createballot/CreateBallotIntegrationTest.java
[ERROR] Error(s) during compilation:
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type
[...]

The lines saying [ERROR] Pb(2) de.serra.condorcat.createballot.var cannot be resolved to a type suggest that this is a problem with the var keyword.

Serranya avatar Feb 06 '20 11:02 Serranya

Hello @tomasalmeida,

In Dspot, we use by default the version 1.4.0 of PIT and descartes as mutation engine.

However, it seems that both of them do not support Java 11.

On my side, I am able to run DSpot on your project with the following command-line, from the folder mutant-testing/text-analysis:

mvn clean eu.stamp-project:dspot-maven:3.1.0:amplify-unit-tests -Dverbose=true -Dgregor-mode=true -Dpit-version=1.4.10

Here, I use the maven plugin of DSpot in order to run DSpot on your project (instead of using the jar, which is exactly the same but the maven plugin is easier to use for me).

I now detail all the options that I used:

  1. -Dverbose=true enable the verbose mode to have more traces.
  2. -Dgregor-mode=true enable the Gregor engine for PIT. The Gregor engine is the default mutation engine of PIT. But as I said, in DSpot we use the descartes mutation engine, which is a mutation developed by colleague of the STAMP project that performs extreme mutations.
  3. -Dpit-version=1.4.10 specify a version of PIT to be used. In this case, it seems that the default version of PIT in DSpot, i.e. 1.4.0, does not support Java 11. This is why here, I specify the version 1.4.10 of PIT, which seems to support Java 11.

The result of the command line is the following:

Test class that has been amplified: demo.text.analysis.BalancedBracketsValidatorTest
The original test suite kills 118 mutants
The amplification results with 0 new tests
it kills 0 more mutants

Not so good... but eh, we did succeed to execute DSpot on your tests.

I then add some input amplifiers, in order to explore the input space of your tests. I added the following option to the previous command line:

-Damplifiers=FastLiteralAmplifier,MethodDuplicationAmplifier,MethodRemove,MethodAdderOnExistingObjectsAmplifier

The new result are:

Test class that has been amplified: demo.text.analysis.BalancedBracketsValidatorTest
The original test suite kills 118 mutants
The amplification results with 2 new tests
it kills 4 more mutants

which is a bit better. I let you play a bit more on your side. You can use different amplifiers, please refer to the README, where you have all the information you need. Please, do not hesitate to ask questions, I'll try to answer you.

NB1: The options of the maven plugin are exactly the same than the options of the jar. You just need to put a -D as prefix, and separate the option and the value with an =. For example, the corresponding command line of the one that I gave (that use the maven plugin) is the following:

java -jar dspot.jar --verbose --gregor-mode --pit-version 1.4.10

NB2: When applying DSpot on multi-modules projects, you might encounter difficulties with paths. Here, it seems that it is ok, you might need to use the option -Dtarget-module=<module> and run DSpot from the root module.

@Serranya I'm looking at your issue right now.

danglotb avatar Feb 06 '20 14:02 danglotb

Hi @danglotb do you have any news on this?

Serranya avatar Feb 11 '20 08:02 Serranya