PIT is a state of the art mutation testing system, providing gold standard test coverage for Java and the jvm. It's fast, scalable and integrates with modern test and build tooling. Faults (or mutations) are automatically seeded into your code, then your tests are run. If your tests fail then the mutation is killed, if your tests pass then the mutation lived. As it is actually able to detect whether each statement is meaningfully tested, mutation testing is the gold standard against which all other types of coverage are measured. Traditional test coverage (i.e line, statement, branch, etc.) measures only which code is executed by your tests. It does not check that your tests are actually able to detect faults in the executed code. It is therefore only able to identify code that is definitely not tested.
Features
- Mutation testing is conceptually quite simple
- The quality of your tests can be gauged from the percentage of mutations killed
- PIT runs your unit tests against automatically modified versions of your application code
- Traditional test coverage (i.e line, statement, branch, etc.) measures only which code is executed by your tests
- The most extreme examples of the problem are tests with no assertions
- As it is actually able to detect whether each statement is meaningfully tested, mutation testing is the gold standard against which all other types of coverage are measured