Closed ebramirez closed 4 years ago
I see no problem in upgrading embedded Pitest's version however I don't understand how it would help you. Isn't the issue related to Pitest's Gradle plug-in rather than to Pitest itself?
I actually suspect that Pitclipse does not behave as expected with your project because it is likely not aware of Gradle dependencies. Could you detail what you mean by "does not work" and the error/logs you have when running PIT through Pitclipse?
Hi,
It could be the version of the Gradle plug-in, but I have no way of trying because the version 1.4.X of the plugin/pitest does not work either in Gradle.
By not working I mean that I can run the tests using the PIT Mutation Test Launch configuration, but I get this result:
Here is the console output in Eclipse: https://gist.github.com/ebramirez/a378952fad933659ae8d9a9b46945982
Thank you very much for providing the full log. Tests are wrote with JUnit 5, aren't they? This is not reflected in the configuration you gave in StackOverflow but the logs show dependencies to JUnit Jupiter.
That matters because Pitclipse has to explicitely tell Pitest whether tests are written in JUnit 4 (default) or JUnit 5. The issue is that, currently, Pitclipse doesn't check dependencies fetched by third-parties and likely doesn't detect JUnit 5 in your project's classpath. The same issue has already been reported for Maven: #116.
Thanks for the quick response.
The StackOverflow question is not mine, I just found it while searching for the some guidance.
Yes, the tests a written in JUnit5 and is configured as such in Gradle:
plugins {
id 'info.solidsoft.pitest' version '1.5.1'
}
pitest {
junit5PluginVersion = '0.12'
testSourceSets = [sourceSets.test]
}
How do I configure that in Pitclipse?
How do I configure that in Pitclipse?
Currently you can't: I'll work on this as soon as possible. Meanwhile, a possible workaround might be to add the JUnit 5 library to the project:
But it will likely caused conflicts with the JUnit 5 JARs pulled by Gradle.
Sorry for the inconvience, I'll keep you updated as soon as a fix is available.
I've just deployed a new 2.2.1
version which should detect JUnit 5 even when provided by Gradle (but doesn't embed Pitest 1.5.2 yet). Could you test it and confirm that it does fix the issue?
If it doesn't, would you mind sharing a sample project where the analysis fails?
I can confirm that this works now in Eclipse 4.16.
Thank you very much @echebbi!
Motivation
The current version bundled version, 1.4.11, does not work in my setup while running the gradle plugin using 1.5.2 works. I upgraded the gradle version after encountering this error in stackoverflow:
Proposed Solution
Update the pitest bundled version to 1.5.2