Mutation testing tool for Swift projects
Top 60.9% on sourcepulse
Muter is a mutation testing tool designed to enhance the quality and effectiveness of Swift test suites. It helps developers identify gaps in test coverage, validate assertion strength, and assess test suite stability by introducing small code changes (mutants) and checking if existing tests fail. This process yields a mutation score, providing actionable insights into test suite health.
How It Works
Muter operates by generating "mutants" – modified versions of the source code – using predefined mutation operators. It then executes the project's test suite against each mutant. A mutant is "killed" if a test fails, indicating the test suite effectively caught the code change. The mutation score, calculated as (killed mutants / total mutants) * 100, quantifies test suite robustness. Muter works on a copy of the codebase to prevent unintended modifications.
Quick Start & Requirements
brew install muter-mutation-testing/formulae/muter
or build from source (git clone ... && cd muter && make install
).muter init
to generate a muter.conf.yml
file.muter
from the project root.Highlighted Details
mutate-without-running
and run-without-mutating
workflow to handle compilation issues with mutants.Maintenance & Community
The project appears to be actively maintained by a dedicated team. Further community engagement details (Discord/Slack links, roadmap) are not explicitly provided in the README.
Licensing & Compatibility
The README does not explicitly state a license. Given the GitHub repository, it's likely MIT or a similar permissive license, but this requires verification. Compatibility with commercial or closed-source projects is assumed unless otherwise stated.
Limitations & Caveats
Muter has known limitations with @resultBuilder
annotated functions due to implicit return requirements, potentially causing compilation errors. It also assumes specific code formatting (spaces around operators, no semicolons on lines with multiple expressions). Objective-C code is not supported.
4 weeks ago
Inactive