MuJava vs PIT
MuJava
albany.eduPIT
pitest.orgSide by side
| Figure | MuJava | PIT |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 0 |
| Spec score · Mutation Testing Tools | 8.4 (#3) | 7.0 (#20) |
| Language support | Version 4 supports Java 1.6 language features including generics, annotations, enumerations, varargs, enhanced for-each loops, and static imports. | The FAQ lists Java as supported and says Kotlin support is available through an ArcMutate plugin. |
| Mutation operators | It creates object-oriented mutants using 24 class-level operators and also supports method-level operators. | PIT applies configurable bytecode mutations, including removing method calls, inverting logic, and altering return values. |
| Purpose | MuJava automatically generates mutants for Java programs for traditional method-level and class-level mutation testing. | PIT runs unit tests against automatically modified versions of application code to measure whether tests detect faults. |
| Support | The maintainers offer MuJava as-is and do not guarantee question answering, fault fixing, or improvements. | PIT directs users to its Google Group for support questions. |
Plans
In their own words
MuJava
MuJava is a free, open-source tool for mutation testing of Java programs. It generates mutants for individual classes and packages, using 24 class-level operators as well as method-level operators, then runs tests against those mutants and evaluates mutation coverage. Tests must be JUnit test cases with public test classes and methods that call the classes under test; JUnit test suites are not supported. Equivalent mutants require manual identification, and the documentation says they typically make up 5% to 20% of mutants. Version 4 supports Java 1.6 language features, including generics, annotations, enumerations, varargs, enhanced for-each loops and static imports. Setup uses two JAR files and a configuration file, with Java CLASSPATH and PATH configuration. The documented workflow uses Java GUI applications; a command-line interface called muScript was released in March 2014, and an Eclipse plugin was created in 2007. The project is provided as-is, without guarantees of answers, repairs or improvements. It is available for Linux, macOS and Windows.
PIT
PIT is a free mutation-testing tool for Java and JVM bytecode projects. It measures whether unit tests detect faults by running them against modified versions of application code. Configurable bytecode mutations can remove method calls, invert logic, or change return values. PIT selects and prioritizes tests using line coverage, execution speed, and naming conventions, then reports mutation coverage alongside line coverage. It can run from the command line, Ant, or Maven; third-party integrations are listed for Gradle, Eclipse, and IntelliJ. Java is supported directly, and Kotlin use is available through the ArcMutate plugin. PIT supports JUnit 3, JUnit 4, and TestNG; JUnit 5 needs a plugin. Versions 1.4.0 and later require Java 8 or above and JUnit or TestNG on the classpath. Mutation runs can take a long time depending on codebase size and test-suite speed, so PIT recommends focusing on changed code. It mutates bytecode and requires line numbers and source file names in that bytecode.