thedivergentai/gd-agentic-skills
godot-testing-patterns
Expert testing decision trees for GdUnit4: unit vs scene vs CI gates, headless runners, snapshots, and mock networks.
Agent workflows
Design & UI
Testing
Use judgment
Installs
408
Stars
678
Security
No audit
Freshness
Unknown
Updated
—
First seen Feb 10, 2026
Installation
Project
Global
Entire repo
Entire repo (global)
$
npx skills add thedivergentai/gd-agentic-skills --skill godot-testing-patterns
Copy
SKILL.md
Decision Tree → Scripts
Need
Choice
Script (MANDATORY when chosen)
Pure logic / no tree
Unit
[basicunit test.gd](scripts/basicunit test.gd), [mockdependency test.gd](scripts/mockdependency test.gd), [testdata factory.gd](scripts/testdata factory.gd)
Node interaction after instantiate
Scene integration
[sceneintegration test.gd](scripts/sceneintegration test.gd), [integrationtest base.gd](scripts/integrationtest base.gd)
Signal contracts
Unit or scene
[signalemission test.gd](scripts/signalemission test.gd)
Multi-frame / physics step
Async scene
[waitfor frametest.gd](scripts/wait forframe test.gd), [physicscollision test.gd](scripts/physicscollision test.gd)
Flaky physics / timing races
Frame step gate
MANDATORY [waitfor frametest.gd](scripts/wait forframe test.gd) — never wall-clock sleep
CI / no display
Headless gate
MANDATORY [headlesstest runner.gd](scripts/headlesstest runner.gd)
Save/UI regression
Snapshot
MANDATORY [snapshottester.gd](scripts/snapshot tester.gd)
RPC without live peers
Mock network
MANDATORY [mocknetwork provider.gd](scripts/mocknetwork provider.gd)
Perf budget in CI
Benchmark gate
[performancebenchmark runner.gd](scripts/performancebenchmark runner.gd)
Orphans after suite
Leak detect
[memoryleak detector.gd](scripts/memoryleak detector.gd)
Edge input space
Fuzz
[parameterfuzz tester.gd](scripts/parameterfuzz tester.gd)
Do NOT Load assert-catalog tutorials or manual gameplay checklists into context — pick a row, read the script, implement.
MANDATORY Triggers
CI / --headless : always read [headlesstest runner.gd](scripts/headlesstest runner.gd) first (OS.exit_code, GdUnit4 CLI: godot --headless -s addons/gdUnit4/bin/GdUnitCmdTool.gd -a res://test).
State or visual golden files : read [snapshottester.gd](scripts/snapshot tester.gd) before writing JSON/image goldens. Approve workflow: first run saves reference; intentional UI change → delete or overwrite res://tests/snapshots/<name>.png, re-run to regenerate, commit new golden; never hand-edit PNG bytes.
Any RPC / MultiplayerSynchronizer test : read [mocknetwork provider.gd](scripts/mocknetwork provider.gd) before standing up real peers.
Available Scripts
[basicunit test.gd](scripts/basicunit test.gd)
Minimal GdUnit4 (GdUnitTestSuite) structure for pure logic.
[signalemission test.gd](scripts/signalemission test.gd)
Signal emission monitoring for decoupled architectures.
[mockdependency test.gd](scripts/mockdependency test.gd)
Mocks/doubles to isolate external services.
[sceneintegration test.gd](scripts/sceneintegration test.gd) / [integrationtest base.gd](scripts/integrationtest base.gd)
Scene lifecycle + node interaction fixtures.
[headlesstest runner.gd](scripts/headlesstest runner.gd)
CI headless orchestration and exit codes.
[snapshottester.gd](scripts/snapshot tester.gd)
Dictionary/UI golden snapshot comparison.
[mocknetwork provider.gd](scripts/mocknetwork provider.gd)
Loopback / offline multiplayer peer for RPC tests.
[performancebenchmark runner.gd](scripts/performancebenchmark runner.gd)
Microsecond timers + Performance monitor gates.
[memoryleak detector.gd](scripts/memoryleak detector.gd)
Orphan node detection across long suites.
[parameterfuzz tester.gd](scripts/parameterfuzz tester.gd)
Randomized ranges for edge crashes.
[waitfor frametest.gd](scripts/wait forframe test.gd) / [physicscollision test.gd](scripts/physicscollision test.gd)
Frame/physics-step async verification.
[testdata factory.gd](scripts/testdata factory.gd)
Schema-compliant fixture builders.
NEVER Do in Testing (GdUnit4)
NEVER test private implementation details — Assert public behavior only.
NEVER share mutable state between tests — Fresh setup per test (before_test / equivalent).
NEVER use wall-clock sleep / blind timers — Prefer frame steppers from waitfor frame patterns.
NEVER skip cleanup — Free instantiated nodes after each test.
NEVER test randomness without seeding .
NEVER assert signals without the GdUnit signal assert/monitor helpers from [signalemission test.gd](scripts/signalemission test.gd).
NEVER mix GUT and GdUnit4 APIs in one suite.
NEVER rely on editor-only features for CI — Headless-compatible tests only.
NEVER default to full-level integration tests — Prefer unit + small scene tests; escalate only when the decision tree says so.
NEVER hardcode brittle absolute file paths in fixtures.
NEVER test third-party plugin internals — Test your integration only.
Expert Gates (short)
Snapshot : serialize → compare golden ([snapshottester.gd](scripts/snapshot tester.gd)); regenerate reference PNG on approved visual changes.
CI : --headless + OS.exitcode non-zero on failure ([headlesstestrunner.gd](scripts/headless test_runner.gd)).
Network : mock peer before real ENet (mocknetwork provider.gd).
Perf : Performance monitors / draw-call caps in benchmark runner.
Deep recipes (on demand)
LLM-ignorance rule: if a general agent would not know it before reading, it lives here or in scripts/ — never delete, only move.
Topic
Reference
Snapshot / CI / fuzz / perf
[expert-testing-patterns.md](references/expert-testing-patterns.md)
Release smoke checklist
[manual-testing-checklist.md](references/manual-testing-checklist.md)
Reference
Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
Official Documentation
Related Skills
Prerequisites
Complements
Downstream / consumers
Master
godot-master — library router and mirrored module entry for cross-skill discovery.