PIT
pitest.org
- Free plan
- Windows
- macOS
- Linux
- Self-hosted
What PIT is
PIT is a free mutation-testing tool for Java and JVM projects. It assesses whether unit tests detect faults by running them against modified versions of application code. Its configurable bytecode mutations can remove method calls, invert logic, or change return values. PIT uses line coverage, test execution speed, and test naming conventions to choose and prioritize tests, then reports mutation coverage alongside line coverage. It can be launched from the command line, Ant, or Maven, with third-party integrations for Gradle, Eclipse, and IntelliJ. Java is supported directly; Kotlin use is available through the ArcMutate plugin. PIT requires line numbers and source file names in bytecode, which it mutates rather than recompiling source code. Versions 1.4.0 and later require Java 8 or above and JUnit or TestNG on the classpath. JUnit 5 is not supported out of the box, though a plugin is linked. Mutation runs can take a long time depending on project size and test-suite speed, so PIT recommends focusing analysis on changed code.
Who it suits
PIT suits developers working with Java or JVM bytecode who want to assess whether their unit tests detect faults. Kotlin projects can use it through the ArcMutate plugin.
Good to know, and what to watch
- Free to use.
- Reports mutation coverage alongside line coverage.
- Can prioritize tests using coverage and execution speed.
- Launches from the command line, Ant, or Maven.
- Supports incremental analysis and parallel execution.
- JUnit 5 needs a plugin.
- Requires Java 8 or above from version 1.4.0.
- Mutation runs can take a long time.
- Bytecode needs line numbers and source file names.
The verdict
PIT gives Java and JVM teams a way to measure test effectiveness through mutation coverage. Check its framework and bytecode requirements, and consider focusing runs on changed code to manage runtime.
What the maker publishes
- Build integrations
- PIT can be launched from the command line, Ant, or Maven, with third-party integrations for Gradle, Eclipse, and IntelliJ. source
- Bytecode requirement
- PIT requires line numbers and source file names in bytecode and mutates bytecode rather than compiling source code. source
- Distribution
- PIT releases are available through GitHub and its binaries are available on Maven Central. source
- IDE integrations
- The PIT site lists third-party Eclipse and IntelliJ plugins and says PIT can also be launched from most other IDEs as a Java application. source
- JUnit 5 limit
- JUnit 5 is not supported out of the box, though the FAQ links to a plugin for it. source
- Language coverage
- PIT is designed for Java and the JVM; Kotlin support is provided through an ArcMutate plugin. source
- Language support
- The FAQ lists Java as supported and says Kotlin support is available through an ArcMutate plugin. source
- Maker
- The About page identifies Henry Coles, a software developer based in Edinburgh, as the principal author and says PIT has also received contributions from others. source
- Mocking frameworks
- PIT says it is tested with major mocking frameworks and lists JMock, EasyMock, Mockito, PowerMock, and JMockit as working with it. source
- Mutation coverage
- PIT reports mutation coverage alongside line coverage, and describes mutation testing as a way to assess whether executed code is meaningfully tested. source
- Mutation handling
- PIT keeps generated mutations in memory and does not write them to disk unless its EXPORT feature is explicitly enabled. source
- Mutation operators
- PIT applies configurable bytecode mutations, including removing method calls, inverting logic, and altering return values. source
- Purpose
- PIT runs unit tests against automatically modified versions of application code to measure whether tests detect faults. source
- Reports
- PIT produces reports combining line coverage and mutation coverage information. source
- Requirements
- The FAQ says PIT 1.4.0 and later requires Java 8 or above and either JUnit or TestNG on the classpath. source
- Runtime limitation
- Mutation testing can take a long time depending on codebase size and test suite speed; PIT recommends focusing analysis on changed code. source
- Security and compliance
- The PIT pages reviewed do not state security certifications or compliance attestations. source
- Security and privacy
- PIT’s FAQ says generated mutations are held in memory and not written to disk unless its EXPORT feature is explicitly enabled; the site privacy page says it uses Google Analytics cookies and log files. source
- Support
- PIT directs users to its Google Group for support questions. source
- Test selection
- PIT uses line coverage, test execution speed, and test naming conventions to select and prioritize tests for mutations. source
Checked against the maker's pages on 30 Sept 2026.