szpak / gradle-pitest-plugin

Gradle plugin for PIT Mutation Testing
http://gradle-pitest-plugin.solidsoft.info/
212 stars 57 forks source link

Support java-test-fixtures plugin #223

Closed pkubowicz closed 3 years ago

pkubowicz commented 3 years ago

Applying 'java-test-fixtures' plugin caused 'No mutations found' from Pitest.

The plugin changes test runtime classpath: tested code is included as a JAR instead of as a directory (see gradle/gradle#11696). It seems that Pitest ignores correct directories being passed using --mutableCodePaths and insists on having those directories also passed in --classPath.

Also change functional tests: runTasksSuccessfully() fails the test without giving any context, so it should be avoided.


The project I work on uses java-test-fixtures plugin, so this issue blocks me from using Pitest.

pkubowicz commented 3 years ago

Builds failing on Travis seems to be victims of the unstable build. My PR passes on Travis for Java 11 and 14. Tests pass when I run them locally with Java 8. AppVeyor build with Java 8 passes.

szpak commented 3 years ago

Btw, I spotted that the weekly cron build on Travis hasn't started "recently" and the problem with PIT 1.1.5 started to occur also in devel.

image

I will fix it right away in devel and let you know to rebase your branch.

szpak commented 3 years ago

Building. Feel free to rebase once it's green.

pkubowicz commented 3 years ago

Is there something this PR is waiting for to be merged?

szpak commented 3 years ago

Nope, I accepted it and it's waiting for a longer moment of time to adjust the last commit after merge :).

pkubowicz commented 3 years ago

Can you release this bugfix and refactor tests later? There is no workaround for this problem.

szpak commented 3 years ago

Thanks for a reminder. 1.5.2 is just being released on Travis: https://travis-ci.org/github/szpak/gradle-pitest-plugin/jobs/719031199

pkubowicz commented 3 years ago

Thank you!