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.

72

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

assertions.mdreferences/

GUT assertion family - reference

Common assertions for godot-gut-tests, per gut.readthedocs.io and the GUT README. The README notes GUT exposes "a plethora of asserts and utility methods" - check the addons/gut/test.gd source in your installed version for the complete signature list at the engine version you ship against.

AssertionUse
assert_eq(a, b, msg)Equality
assert_ne(a, b, msg)Inequality
assert_almost_eq(a, b, tol, msg)Float comparison within tolerance
assert_true(v, msg) / assert_false(v, msg)Boolean
assert_null(v, msg) / assert_not_null(v, msg)Null check
assert_has(coll, v, msg) / assert_does_not_have(coll, v, msg)Membership
assert_signal_emitted(obj, "signal_name", msg)Signal emission
assert_signal_emitted_with_parameters(obj, "name", args, msg)Signal emission with payload
assert_gt(a, b, msg) / assert_lt(a, b, msg)Ordering
assert_called(double, "method_name", args)Spy verification

Use assert_almost_eq(a, b, tol) for floats - assert_eq fails on floating-point inequality.

SKILL.md

tile.json