Repository navigation
Mutation testing for GDScript and Godot: find the bugs your green tests would miss.
Coverage tells you a line ran. Mutation testing tells you if a bug there would be caught: gdmutant
mutates your GDScript (flips > and >=, and and or, bumps a number, deletes a statement),
reruns your tests once per change, and reports the survivors — the changes your tests didn't
notice.
Highlights
- AST-based GDScript mutation via gdtoolkit.
Every mutation is re-parsed before it runs, so one that breaks GDScript's syntax is thrown out
instead of reaching your tests and failing for the wrong reason. - Works with the test runner you already have: GdUnit4 and GUT as first-class peer adapters
(--runner gdunit4/--runner gut), or any headless test command via--runner command. - An offline HTML report (
--html): one file, everything inlined, marks the exact changed
characters in your source, and explains each survivor — what's untested, why it matters, where
to start a test. --jobs Nruns mutants in parallel, each in its own copy of the project, for a real speedup on
a real codebase.- A GitHub Action, so CI runs gdmutant from a few lines of
uses:YAML and posts survivors
straight to the job summary. - Safety: mutations are applied in place and restored after every mutant and on exit,
--require-cleanrefuses to run over uncommitted or unconfirmed changes, and a crash
mid-mutation never leaves a source file half-written.
Getting started
Needs Godot 4.3+ on your PATH (or --godot <full-path>), Python 3.12+, and GUT or gdUnit4 already
installed in the project you point it at. This release is verified against Godot 4.7.0, GUT 9.7.1
and gdUnit4 6.1.3.
pip install gdmutant
gdmutant run --project path/to/your/project --runner gut
The README has the full quickstart, and
the guide covers CLI
reference and CI setup. Full details on everything in this release are in
CHANGELOG.md.