Base Features
Requires pitest 1.20.0 or above.
Provided by the arcmutate-base plugin.
In addition to exclusions, extended mutation operators and subsumption analysis, the arcmutate base plugin provides other enhancements to pitest functionality.
Test Stats
When the csv_test_stats
feature string is activated, arcmutate will generate two csv files in the report directory containing details of the test suite.
e.g. for maven
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.20.0</version>
<dependencies>
<dependency>
<groupId>com.arcmutate</groupId>
<artifactId>base</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>
<configuration>
<features>
<feature>+csv_test_stats</feature>
</features>
</configuration>
</plugin>
The tests.csv
file is generated after tests coverage has been gathered, but before mutants are analysed.
It contains the following columns
- class - the class defining the test
- name - the test name as generated by the test plugin
- ms - the test execution time in miliseconds
- blocks - the number of basic blocks executed by the test
The file can be used to identify tests likely to slow mutation analysis before the analysis is attempted.
Once mutation analysis is complete, the killing_tests.csv
is generated.
It contains similar information to the tests.csv
file, but also captures how many mutants were killed by each test.
Due to internal pitest details, the way the test names are recorded is slightly different than in the tests.csv
file.
The file contains four columns.
- test - the fully qualified test name as reported by the test plugin
- killed - the number of mutants killed by the test
- ms - the test execution time in milliseconds
- blocks - the number of basic blocks executed by the test
Note that tests with no recorded kills may well be good effective tests, but other tests may have been run against the mutants they covered before them.
Uncovered Mutants Filter
Mutants with no test coverage can be excluded from the report by activating the feature nouncovered
.
e.g. for maven
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.20.0</version>
<dependencies>
<dependency>
<groupId>com.arcmutate</groupId>
<artifactId>base</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>
<configuration>
<features>
<feature>+nouncovered</feature>
</features>
</configuration>
</plugin>
As uncovered mutants have very low processing cost, activating this filter is unlikely to reduce analysis times. It may however be desirable to remove uncovered mutants from the report when working in test or mixed git mode.
Upstream Test Exclusion
Maven modules with dependencies test-jar
dependencies on other modules will include those tests on the project classpath. If the tests are within the same package as the downstream module they will be examined by pitest, potentially increasing overall analysis times.
The base plugin excludes such tests by default. If you wish for the tests to be re-included, the functionality can be disabled with the feature string -exclude_other_module_tests
.