LLM Mutation Testing for any programming language
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mutahunter-1.3.1.tar.gz
(56.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mutahunter-1.3.1.tar.gz.
File metadata
- Download URL: mutahunter-1.3.1.tar.gz
- Upload date:
- Size: 56.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bec5462ec730b6a337035b8e537a38b42b5db7f5a15df59cb6c583706023411
|
|
| MD5 |
6b9330d569dbe073745354b5e5ccd8c7
|
|
| BLAKE2b-256 |
01c30173eef92e7e90e0dd93fdc7dc2e7fd56168e40df705b486c53740015e4e
|
File details
Details for the file mutahunter-1.3.1-py3-none-any.whl.
File metadata
- Download URL: mutahunter-1.3.1-py3-none-any.whl
- Upload date:
- Size: 50.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d057a271a7c74cdd160a33c752752a81a86c38eed8bbdd2e9a7a92ac7d2315e1
|
|
| MD5 |
1be173eb09bf3028ff5816d64261aa6c
|
|
| BLAKE2b-256 |
cfcefccb47a49e96a7ce589dffd6ceefeed9db187f8ec78b683dc75ce672c7ec
|