Freedom251 › Mutation Testing Tools
PIT

What PIT is
PIT is a free mutation-testing tool for Java and JVM bytecode projects. It measures whether unit tests detect faults by running them against altered versions of application code. Configurable 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 is available through the ArcMutate plugin. PIT supports JUnit 3, JUnit 4, and TestNG; JUnit 5 requires a plugin. Versions 1.4.0 and later require Java 8 or above and JUnit or TestNG on the classpath. Mutation runs may take a long time depending on project size and test speed, so PIT recommends focusing analysis on changed code. It requires line numbers and source file names in bytecode.
Who it suits
PIT suits developers working on Java or JVM projects who want to assess whether tests catch faults. Kotlin users can use the ArcMutate plugin, and JUnit 5 users need a plugin.
What it does well
- Free mutation testing for Java and JVM projects.
- Reports mutation coverage alongside line coverage.
- Can be launched from command line, Ant, or Maven.
- Supports incremental analysis and parallel execution.
- Generated mutations stay in memory unless exported.
What to know first
- JUnit 5 needs a plugin.
- Requires Java 8 or above from version 1.4.0.
- Mutation runs can take a long time.
- Requires line numbers and source file names in bytecode.
Limits
PIT is free. JUnit 5 is not supported out of the box, and mutation runs can take a long time depending on codebase size and test-suite speed.
Getting started
- Visit https://pitest.org/.
- Use a Linux, macOS, Windows, or self-hosted environment.
- Ensure Java 8 or above and JUnit or TestNG are on the classpath for PIT 1.4.0 and later.
- Launch PIT from the command line, Ant, or Maven, or use a listed third-party integration.
- Focus analysis on changed code to limit the scope of mutation runs.
Verdict
PIT provides mutation coverage reports and test selection for Java and JVM projects. Account for its bytecode requirements, framework support, and potentially lengthy mutation runs when planning analysis.
Questions
How much does PIT cost?
PIT is free, with a free plan.
Which languages does it support?
PIT is designed for Java and JVM bytecode. Kotlin support is available through the ArcMutate plugin.
Which test frameworks can I use?
PIT supports JUnit 3, JUnit 4, and TestNG. JUnit 5 requires a plugin.
How can I run PIT?
PIT can be launched from the command line, Ant, or Maven. Third-party integrations are listed for Gradle, Eclipse, and IntelliJ.
Who makes PIT?
Henry Coles, a software developer based in Edinburgh, is identified as its principal author; others have also contributed.
Does PIT write generated mutations to disk?
Generated mutations are held in memory and are not written to disk unless the EXPORT feature is enabled.
Facts from PIT's own pages
- Build integrations
- PIT can be launched from the command line, Ant, or Maven, with third-party integrations for Gradle, Eclipse, and IntelliJ. · pitest.org, 30 Sept 2026
- Bytecode requirement
- PIT requires line numbers and source file names in bytecode and mutates bytecode rather than compiling source code. · pitest.org, 30 Sept 2026
- Distribution
- PIT releases are available through GitHub and its binaries are available on Maven Central. · pitest.org, 30 Sept 2026
- 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. · pitest.org, 30 Sept 2026
- JUnit 5 limit
- JUnit 5 is not supported out of the box, though the FAQ links to a plugin for it. · pitest.org, 30 Sept 2026
- Language coverage
- PIT is designed for Java and the JVM; Kotlin support is provided through an ArcMutate plugin. · pitest.org, 30 Sept 2026
- Language support
- The FAQ lists Java as supported and says Kotlin support is available through an ArcMutate plugin. · pitest.org, 30 Sept 2026
- 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. · pitest.org, 30 Sept 2026
- Mocking frameworks
- PIT says it is tested with major mocking frameworks and lists JMock, EasyMock, Mockito, PowerMock, and JMockit as working with it. · pitest.org, 30 Sept 2026
- Mutation coverage
- PIT reports mutation coverage alongside line coverage, and describes mutation testing as a way to assess whether executed code is meaningfully tested. · pitest.org, 30 Sept 2026
- Mutation handling
- PIT keeps generated mutations in memory and does not write them to disk unless its EXPORT feature is explicitly enabled. · pitest.org, 30 Sept 2026
- Mutation operators
- PIT applies configurable bytecode mutations, including removing method calls, inverting logic, and altering return values. · pitest.org, 30 Sept 2026
- Purpose
- PIT runs unit tests against automatically modified versions of application code to measure whether tests detect faults. · pitest.org, 30 Sept 2026
- Reports
- PIT produces reports combining line coverage and mutation coverage information. · pitest.org, 30 Sept 2026
- Requirements
- The FAQ says PIT 1.4.0 and later requires Java 8 or above and either JUnit or TestNG on the classpath. · pitest.org, 30 Sept 2026
- Runtime limitation
- Mutation testing can take a long time depending on codebase size and test suite speed; PIT recommends focusing analysis on changed code. · pitest.org, 30 Sept 2026
- Security and compliance
- The PIT pages reviewed do not state security certifications or compliance attestations. · pitest.org, 30 Sept 2026
- 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. · pitest.org, 30 Sept 2026
- Support
- PIT directs users to its Google Group for support questions. · pitest.org, 30 Sept 2026
- Test selection
- PIT uses line coverage, test execution speed, and test naming conventions to select and prioritize tests for mutations. · pitest.org, 30 Sept 2026
Where PIT stands on Freedom251
- Mutation Testing Tools#16 of 25
