newb PIT/Spock question

20 views
Skip to first unread message

Michael Bailey

unread,
Dec 16, 2022, 2:25:17 AM12/16/22
to PIT Users
Hi,

We recently completed a hackathon project to give pitest a try. The main issue we had is that we have some repositories upgraded to Spock 2.x, most at Spock 1.x. pitest on Spock 2.x was mysteriously not picking up our Spock tests (the vast majority) leading to no mutation errors, and down the chain. Took days to figure it out. We ended up having to downgrade Spock on all the newer projects, and leave it for another day.

What configuration do we need to get pitest working? Our main constraint is that we're on an older version of Gradle so we're limited to pitest 1.4.0. We don't explicitly include JUnit dependencies in our repositories, so we can't fiddle with that. useJUnitPlatform() seems to have no effect. I'm wondering if this is even possible, or if we just have to wait on pitest until we're able as an organization to upgrade Gradle.

There's probably an easy solution, thanks in advance for your help!

Michael

P.S. Suggestion: put the troubleshooting items in the FAQ into a "troubleshooting" menu item. FAQ would usually include more general questions about mutation testing, platform, etc., and in the heat of implementation it took us a while to cycle around and read the FAQ, which contains good troubleshooting information.


henry

unread,
Dec 16, 2022, 2:28:44 AM12/16/22
to PIT Users
Spock 2 looks to be based on the JUnit5 platform. Did you try adding the pitest JUnit5 plugin to the project?

Reply all
Reply to author
Forward
0 new messages