Skip to main content

Mutahunter

Open-Source Language Agnostic LLM-based Mutation Testing

GitHub license Unit Tests Last Commit

Getting Started with Mutation Testing

# Install Mutahunter package via GitHub. Python 3.11+ is required.
$ pip install https://github.com/codeintegrity-ai/mutahunter

# Work with GPT-4o on your repo
$ export OPENAI_API_KEY=your-key-goes-here

# Run Mutahunter on a specific file. 
$ mutahunter run --test-command "mvn clean test" --model "gpt-4o-mini" --source-path "src/main/java/com/example/BankAccount.java" --test-path "src/test/java/BankAccountTest.java"


2025-03-05 18:56:42,528 INFO: 'mvn clean test' - '/Users/taikorind/Desktop/mutahunter/examples/java_maven/logs/_latest/mutants/34a5d8a5_BankAccount.java'
2025-03-05 18:56:44,935 INFO: 🛡️ Mutant survived 🛡️

2025-03-05 18:56:44,936 INFO: 'mvn clean test' - '/Users/taikorind/Desktop/mutahunter/examples/java_maven/logs/_latest/mutants/183e6826_BankAccount.java'
2025-03-05 18:56:47,308 INFO: 🗡️ Mutant killed 🗡️

. . . .-. .-. . . . . . . .-. .-. .-.
|\/| | | | |-| |-| | | |\| | |-| |
' ` `-' ' ` ` ' ' ` `-' ' ` `-' ' '

2024-07-29 12:31:22,045 INFO:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

📊 Overall Mutation Coverage 📊
🎯 Mutation Coverage: 57.14% 🎯
🦠 Total Mutants: 7 🦠
🛡️ Survived Mutants: 3 🛡️
🗡️ Killed Mutants: 4 🗡️
🕒 Timeout Mutants: 0 🕒
🔥 Compile Error Mutants: 1 🔥
💰 Total Cost: $0.00060 USD 💰

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2025-03-05 18:56:54,689 INFO: Mutation Testing Ended. Took 29s

Examples

Go to the examples directory to see how to run Mutahunter on different programming languages:

Check Java Example to see some interesting LLM-based mutation testing examples.

Metadata

Release files for mutahunter 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mutahunter 1.3.2
File Size Uploaded
mutahunter-1.3.2.tar.gz 56.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mutahunter 1.3.2
File Interpreter ABI Platform
mutahunter-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 106.9 kB

Release files / mutahunter-1.3.2.tar.gz

Download URL mutahunter-1.3.2.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
31e8001c8152fa627de2f0a98527328acbc5b1d76af72a54ed8be505f77355ac
BLAKE2b-256 checksum
How to use checksums
001c4694176f0ff14add05459447e551dc94691d2e78aa0801a4724b302aa50c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mutahunter-1.3.2-py3-none-any.whl

Download URL mutahunter-1.3.2-py3-none-any.whl
Size 50.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ceb75f34dbf4ef439d0d5e2dbfd5a646c68ce6927d9ad45cb544f213ce6a9e36
BLAKE2b-256 checksum
How to use checksums
c1260597215a051184408a0524de36621416ff8ed4263790df65f745eff42152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page