Coder Social home page Coder Social logo

Comments (4)

szpak avatar szpak commented on June 12, 2024

Regarding missing dependency as a workaround you have to add snapshot repository also to the normal (buildscript) repositories section. I had problem with adding additional configuration to buildscript and pitest configuration is added as a project configuration (which shouldn't be a problem as this configuration is not connected to compile or testCompile dependencies). I have to check out if this can be changed.

NPE can be somehow misleading, but the standard error message is still fine:

Could not resolve org.pitest:pitest-command-line:0.34-SNAPSHOT.

Nevertheless I reported the issue.

Unfortunately with PIT 0.34-SNAPSHOT the mutation testing still doesn't work and fails with exceptions like below:

Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDKstderr  :  64-Bit Server VM
Vendor : Oracle Corporation
Version : 24.51-b03
Uptime : 1314
Input -> 
 1 : -javaagent:/tmp/14000973902870161142591343656384164131265019263451.jar
 2 : -Dfile.encoding=UTF-8
BootClassPathSupported : true

stderr  :   at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)stderr  : 
stderr  :   at org.pitest.mutationtest.execute.MutationTimeoutDecorator.executeFutureWithTimeOut(MutationTimeoutDecorator.java:68)
stderr  :   at org.pitest.mutationtest.execute.MutationTimeoutDecorator.execute(MutationTimeoutDecorator.java:52)stderr  : 
stderr  :   at org.pitest.execute.MultipleTestGroup.execute(MultipleTestGroup.java:37)stderr  : 
stderr  :   at org.pitest.mutationtest.execute.MutationTestWorker$1.submit(MutationTestWorker.java:148)
stderr  :   at org.pitest.execute.Pitest$3.run(Pitest.java:182)stderr  : 
stderr  :   at java.lang.Thread.run(Thread.java:744)
stderr  : Caused by: java.util.concurrent.ExecutionException: org.testng.TestNGException: 
Cannot instantiate class com.github.parboiled1.grappa.statistics.NoMismatchesStatisticsTeststderr  : 
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)stderr  : 
stderr  :   at java.util.concurrent.FutureTask.get(FutureTask.java:202)
stderr  :   at org.pitest.mutationtest.execute.MutationTimeoutDecorator.executeFutureWithTimeOut(MutationTimeoutDecorator.java:62)stderr  : 
stderr  :   ... 5 more
stderr  : Caused by: org.testng.TestNGException: 
Cannot instantiate class com.github.parboiled1.grappa.statistics.NoMismatchesStatisticsTeststderr  : 
stderr  :   at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
stderr  :   at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)stderr  : 
stderr  :   at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
stderr  :   at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)stderr  : 
stderr  :   at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
stderr  :   at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)stderr  : 
stderr  :   at org.testng.TestRunner.initMethods(TestRunner.java:409)
stderr  :   at org.testng.TestRunner.init(TestRunner.java:235)stderr  : 
stderr  :   at org.testng.TestRunner.init(Tener.java:205)
stderr  :   at org.testng.TestRunner.<init>(TestRunner.java:153)stderr  : 
stderr  :   at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)stderr  : 
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)stderr  : 
stderr  :   at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
stderr  :   at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)stderr  : 
stderr  :   at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
stderr  :   at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)stderr  : 
stderr  :   at org.testng.TestNG.run(TestNG.java:1057)
stderr  :   at org.pitest.testng.TestNGTestUnit.executeInCurrentLoader(TestNGTestUnit.java:91)stderr  : 
stderr  :   at org.pitest.testng.TestNGTestUnit.execute(TestNGTestUnit.java:64)
stderr  :   at org.pitest.mutationtest.execute.MutationTimeoutDecorator$1.call(MutationTimeoutDecorator.java:88)stderr  : 
stderr  :   at java.util.concurrent.FutureTask.run(FutureTask.java:262)stderr  : 
    ... 1 morestderr  : 
stderr  : Caused by: java.lang.reflect.InvocationTargetExceptionstderr  : 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)stderr  : 
stderr  :   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)stderr  : 
stderr  :   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
stderr  :   at java.lang.reflect.Constructor.newInstance(Constructor.java:526)stderr  : 
stderr  :   at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
stderr  :   ... 21 morestderr  : 
stderr  : Caused by: java.lang.NullPointerException: at index 0stderr  : 
stderr  :   at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:240)
stderr  :   at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:231)stderr  : 
stderr  :   at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:226)stderr  : 
stderr  :   at com.google.common.collect.ImmuList.copyOf(ImmutableList.java:295)
stderr  :   at org.parboiled.matchers.AbstractMatcher.<init>(AbstractMatcher.java:57)stderr  : 
stderr  :   at org.parboiled.matchers.CustomDefaultLabelMatcher.<init>(CustomDefaultLabelMatcher.java:38)
stderr  :   at org.parboiled.matchers.FirstOfMatcher.<init>(FirstOfMatcher.java:34)stderr  : 
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser$$parboiled.firstOf(Unknown Source)
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser$$parboiled.firstOf(Unknown Source)stderr  : 
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser.sevenOrNine(NoMismatchesParser.java:47)stderr  : 
    at com.github.parboiled1.grappa.testparsers.NoMismatchesParser$$parboiled.sevenOrNine(Unknown Source)stderr  : 
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser.zero(NoMismatchesParser.java:32)
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser$$parboiled.zero(Unknown Source)stderr  : 
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser.mainRule(NoMismatchesParser.java:27)
stderr  :   at com.github.parboiled1.grappa.testparsers.NoMismatchesParser$$parboiled.mainRule(Unknown Source)stderr  : 
stderr  :   at com.github.parboiled1.grappa.statistics.ParserStatisticsTest.<init>(ParserStatisticsTest.java:58)stderr  : 
stderr  :   at com.github.parboiled1.grappa.statistics.NoMismatchesStatisticsTest.<init>(NoMismatchesStatisticsTest.java:30)stderr  : 
stderr  :   ... 26 morestderr  : 
stderr  : Exception in thread "Thread-9" org.pitest.util.PitError: org.testng.TestNGException: 
Cannot instantiate class com.github.parboiled1.grappa.statistics.NoMismatchesStatisticsTest

Are you able to successfully run mutation testing with PIT 0.34-SNAPSHOT using a command line tool?

from gradle-pitest-plugin.

fge avatar fge commented on June 12, 2024

As you suggested, I tried and added the maven URL to repositories.

It worked! Mutation testing runs fine. And that is unlike you... I don't understand why you have this failure.

Note that I have reverted to (gradle) 1.11, I'll now try with 1.12.

from gradle-pitest-plugin.

fge avatar fge commented on June 12, 2024

Works with 1.12 now; anyway, you can consider this issue closed since I now have a working solution!

from gradle-pitest-plugin.

szpak avatar szpak commented on June 12, 2024

I moved pitest dependencies to builscript scope. It should be enough to provide snapshot repository in buildscript section only.
That change can be tested with gradle-pitest-plugin-1.0.0-SNAPSHOT and will be included in upcoming version 1.0.0.

from gradle-pitest-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.