The Major Mutation Framework
Easy and scalable mutation analysis for Java!
(version 3.0.1)
Overview
Major is an efficient and flexible mutation analysis framework that supports:
generating and embedding mutants during compilation;
exporting source-code mutants;
suppressing equivalent mutants;
computing the mutant-detection rate and the set of live mutants for a given set of tests;
computing a complete mutant-test detection matrix for a given set of tests.
The Major mutation framework provides three main components:
Mutator: a mutator plugin for the
javac
Java compiler.Mml: a DSL for customizing mutant generation.
Analyzer: a test runner that efficiently determines live mutants, the mutant-detection ratio, or a full mutant-test matrix.
Installation
The installation is simple — all you need is included in the Major release package!
Download major.zip (the most recent release).
Unzip major.zip, which creates the major directory:
- bin (executables for Major’s components)
- ant
- major
- mmlc
- config (archive and sources of Major’s run-time class)
- doc (manual of the current version)
- major.html
- example (examples for using Major}
- ant
- …
- run.sh
- standalone
- …
- run.sh
- runAll.sh
- ant
- lib (libraries used by Major)
- mml (example mml files)
- bin (executables for Major’s components)
Getting started
Verify that you are using a Java-8 compiler by running javac -version
.
The example directory provides two examples for how to use Major to perform mutation analysis:
ant: mutation analysis using Apache Ant.
standalone: mutation analysis using Major standalone.
Execute runAll.sh
within the example directory to run all examples or run.sh
in a subdirectory for a particular example.