CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/godot-gut-tests

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

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

cli.mdreferences/

GUT command-line runner - flag and config reference

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.

CLI flags

FlagEffect
-gdir=res://testRecurse this directory for tests
-gtest=res://test/unit/test_health.gdRun a single test script
-ginner_class=TestAddItemLimit to one inner class
-gunit_test_name=test_increases_count_by_stackLimit to one test method
-gconfig=res://.gutconfig.jsonLoad config from JSON
-gjunit_xml_file=artifacts/gut-junit.xmlWrite JUnit XML report
-gjunit_xml_timestampAdd timestamp suffix to filename
-glog=3Log verbosity (0 - 3)
-gexitExit 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.

Config file

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.

SKILL.md

tile.json