On 2020-11-09 22:15, Scott Edwards Coll wrote:
> Yes, the JUnit tests run fine by themselves - both 4 and 5 will work at the same time. But when I run mutation coverage using pitest it only picks up the JUnit-5 tests when I’ve specified the pitest-junit5-dependency, and only the JUnit-4 tests when I haven’t.
Just to mitigate a risk of mistake, are you sure you use the
junit5-vintage dependency (and in the report or in Idea you see that
JUnit Platform runs it - one subtree for JUnit Jupiter one for JUnit
Vintage)?
If yes, it would be probably good to provide a simple Gradle or Maven
project with 2 tests and report it as a feature request to
https://github.com/pitest/pitest-junit5-plugin to make it easier for the
project maintainers to play with it as an "acceptance" test, as it might
be a limitation of the plugin, e.g. support only for JUnit Jupiter.
However, for instance Spock 2 (internally using JUnit Platform) works
fine with the pitest-junit5 plugin -
https://github.com/szpak/gradle-pitest-plugin/blob/master/src/funcTest/resources/testProjects/junit5spock2/build.gradle
.
Marcin