Author and run GUT (Godot Unit Test) - the community-canonical GDScript test framework at github.com/bitwes/Gut and gut.readthedocs.io. Covers install (Godot Asset Library or manual `addons/gut/` copy + plugin enable), GUT panel inside the editor, writing tests that extend GutTest with `test_` prefix methods, the assertion family (assert_eq / assert_almost_eq / assert_true / assert_signal_emitted), lifecycle hooks (before_each / after_each / before_all / after_all), inner classes for grouping, parameterized tests via `params=[...]`, doubles / stubs / spies, async / coroutine tests, the command-line runner (`-d -s addons/gut/gut_cmdln.gd -gdir=res://test -gjunit_xml_file=... -gexit`), JUnit XML export, and CI integration. Godot 4.x uses GUT 9.x (current main branch supports 4.6.x; godot_4_7 branch for 4.7.x); Godot 3.x uses GUT 7.x. Use when the unit under test is GDScript code in a Godot project.
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Full flag list and config schema for godot-gut-tests. The CLI runner is
invoked via -d -s addons/gut/gut_cmdln.gd plus GUT-specific options, per
gut.readthedocs.io.
| Flag | Effect |
|---|---|
-gdir=res://test | Recurse this directory for tests |
-gtest=res://test/unit/test_health.gd | Run a single test script |
-ginner_class=TestAddItem | Limit to one inner class |
-gunit_test_name=test_increases_count_by_stack | Limit to one test method |
-gconfig=res://.gutconfig.json | Load config from JSON |
-gjunit_xml_file=artifacts/gut-junit.xml | Write JUnit XML report |
-gjunit_xml_timestamp | Add timestamp suffix to filename |
-glog=3 | Log verbosity (0 - 3) |
-gexit | Exit Godot after run (essential in CI) |
--headless runs Godot without a display window - required for most CI
environments. -d runs in debug mode so the test runner script
(addons/gut/gut_cmdln.gd) executes.
A .gutconfig.json at the project root lets the GUT panel and CLI runner share
settings:
{
"dirs": ["res://test/unit", "res://test/integration"],
"include_subdirs": true,
"log_level": 1,
"junit_xml_file": "artifacts/gut-junit.xml",
"double_strategy": "partial"
}Field names per gut.readthedocs.io - check your
installed addons/gut/ version for the authoritative schema.