0

I am using pit 1.6.7 and I want to use JUnit 4.12, but it looks like pit is always using junit 3.8.1 even junit 4.12 is in the dependency.

How can I force PIT to use junit 4.12 in the maven pom file.

1 Answers1

0

PIT will use the version of junit used by the code under test. Why do you believe it is using 3.8.1?

Your pom declares a non standard fork of junit "4.12-soneya" as a depedency. I can see no reason why this should not work, but you may wish to try using standard junit 4.12 and see if that resolved correctly for you first.

Unrelated to your question, unless you have a good reason for doing so you should not enable ALL mutators, stick with the defaults or STRONGER. You will also have a better experience if you use the latest version of pitest (1.7.1).

henry
  • 5,923
  • 29
  • 46
  • Thanks, 4.12-soneya is a custom JUnit lib where I made some changes, so I am sure that pit is using 3.8.1 from the debug information and that my changes are not reflecting. But when I use mvn clean test, my custom Junit changes are reflected in the output. I used 4.12 but still its picking 3.8.1 for some unknown reason. – middle-mood Oct 26 '21 at 14:52