CLI tool for LLM-based mutation testing
Top 94.7% on sourcepulse
Mutahunter offers an open-source, language-agnostic approach to mutation testing powered by Large Language Models (LLMs). It aims to improve software quality by automatically generating code variations (mutants) and assessing the effectiveness of existing test suites. This tool is designed for developers and QA engineers seeking to enhance their test coverage and identify weaknesses in their testing strategies.
How It Works
Mutahunter leverages LLMs, specifically models like GPT-4o, to generate code mutants. It then executes the project's test suite against these mutants. The core advantage lies in its LLM-driven mutation generation, which can potentially create more semantically relevant and challenging mutants compared to traditional syntactic mutation operators. This approach aims for higher mutation scores and more robust test suites.
Quick Start & Requirements
pip install https://github.com/codeintegrity-ai/mutahunter
export OPENAI_API_KEY=your-key-goes-here
).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"
examples
directory.Highlighted Details
Maintenance & Community
No specific details on contributors, sponsorships, or community channels (like Discord/Slack) are provided in the README.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README.
Limitations & Caveats
The tool relies on external LLM APIs, which may incur costs and introduce latency. The effectiveness and quality of generated mutants are dependent on the chosen LLM. The README does not detail compatibility with specific testing frameworks beyond the Maven example.
3 months ago
1 week