What it does
Mutahunter is a command-line tool for mutation testing that uses a language model. It produces mutated versions of your source code, runs your own test command against each one, and reports which mutants your tests killed and which survived. You point it at a source file and its test file, give it a test command and a model name, and it prints a run log followed by a summary. The README example runs a Maven test command against a Java class using an OpenAI key and the gpt-4o-mini model. The summary shows mutation coverage, the number of total, survived, killed, timeout and compile-error mutants, and the cost of the run in dollars. It installs with pip straight from the GitHub repository and needs Python 3.11 or newer. The project is licensed under AGPL-3.0, and the repository includes a Java Maven example.
Capabilities
- Language-agnostic mutation testing driven by your own test command
- Uses a language model to generate the mutants
- Summary of mutation coverage with killed, survived, timeout and compile-error counts
- Reports the cost of each run
- Installs with pip and needs Python 3.11 or newer
When to use it
- Checking whether your unit tests actually catch bugs
- Finding weak spots in the tests for a specific source file
- Trying mutation testing on projects in several programming languages