https://github.com/codeintegrity-ai/mutahunter?tab=readme-ov-file
Open Source, Language Agnostic Mutation Testing
https://github.com/codeintegrity-ai/mutahunter?tab=readme-ov-file
artificial-intelligence automated-testing llm-agent mutation-testing software-testing static-code-analysis test-automation unit-testing
Last synced: 9 days ago
JSON representation
Open Source, Language Agnostic Mutation Testing
- Host: GitHub
- URL: https://github.com/codeintegrity-ai/mutahunter?tab=readme-ov-file
- Owner: codeintegrity-ai
- License: agpl-3.0
- Created: 2024-06-21T20:49:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-17T15:46:03.000Z (8 months ago)
- Last Synced: 2025-07-21T12:34:34.092Z (4 months ago)
- Topics: artificial-intelligence, automated-testing, llm-agent, mutation-testing, software-testing, static-code-analysis, test-automation, unit-testing
- Language: Python
- Homepage:
- Size: 1.63 MB
- Stars: 275
- Watchers: 8
- Forks: 22
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ai-agents - Documentation
README
## Getting Started with Mutation Testing
```bash
# 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](/examples/java_maven/) to see some interesting LLM-based mutation testing examples.
- [Java Example](/examples/java_maven/)