Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude tests from PIT mutation analysis?

I'm in a drawn-out situation now with a difficult project where a significant part was refactored and checked in with a significant number of failing tests.

I run PIT in maven but I haven't been able to for a long time because the tests have to be green, but I want the PIT overview at least on the tests that do run.

What's the most effective way to isolate the failing tests from PIT?

like image 328
Adam Avatar asked Oct 30 '22 13:10

Adam


1 Answers

I suggest to create JUnit category 'PIT_SKIP' and mark all failing test with it. After that you can set excludedGroups property in PIT maven configuration to filter out selected tests.

You can also go in opposite direction and create category 'PIT_OK' and use property includedGroups.

PIT Maven plugin documentation.

like image 123
Paweł Adamski Avatar answered Nov 15 '22 06:11

Paweł Adamski