Pitest excludedMethods maven

I am trying to exclude PIT from mutating some I / O methods such as "close" and "flush". Here is my Maven configuration:

<plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <version>1.1.3</version> <configuration> <targetClasses> <param>my.package.*.*</param> </targetClasses> <targetTests> <param>my.package.*.*</param> </targetTests> <excludedClasses> <param>my.generated.*</param> <param>**.*IT</param> </excludedClasses> <excludedMethods> <param>close</param> <param>flush</param> </excludedMethods> <reportSets> <reportSet> <reports> <report>report</report> </reports> </reportSet> </reportSets> </configuration> </plugin> 

Excluded classes seem to work, but are not excluded. that is, the PIT result still says that deleting the "close" and "flush" calls does not affect the test result.

Question : What am I missing?

+5
source share
1 answer

Excluded methods are used to avoid creating mutants in methods corresponding to the specified list of names.

I think you want to stop creating mutants that remove calls for closure and cleanup methods. This can be done using the avoidCallsTo parameter.

+5
source

All Articles