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.

First seen Feb 10, 2026

Installation

$ npx skills add thedivergentai/gd-agentic-skills --skill godot-testing-patterns

Summary

  • Expert testing decision trees for GdUnit4: unit vs scene vs CI gates, headless runners, snapshots, and mock networks.
  • Use when choosing test layers, wiring CI, or validating signals/physics without beginner assert catalogs.
  • Keywords: GdUnit4, GdUnitTestSuite, headless CI, snapshot test, mock network, scene integration test, TDD.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from thedivergentai/gd-agentic-skills · top by installs.

npx skills add thedivergentai/gd-agentic-skills

Browse all from thedivergentai/gd-agentic-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 678
License LICENSE
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 11,605 B
  • docs SUMMARY.md 360 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 408 installs

SKILL.md

Decision Tree → Scripts

Need Choice Script (MANDATORY when chosen)
Pure logic / no tree Unit [basicunittest.gd](scripts/basicunittest.gd), [mockdependencytest.gd](scripts/mockdependencytest.gd), [testdatafactory.gd](scripts/testdatafactory.gd)
Node interaction after instantiate Scene integration [sceneintegrationtest.gd](scripts/sceneintegrationtest.gd), [integrationtestbase.gd](scripts/integrationtestbase.gd)
Signal contracts Unit or scene [signalemissiontest.gd](scripts/signalemissiontest.gd)
Multi-frame / physics step Async scene [waitforframetest.gd](scripts/waitforframetest.gd), [physicscollisiontest.gd](scripts/physicscollisiontest.gd)
Flaky physics / timing races Frame step gate MANDATORY [waitforframetest.gd](scripts/waitforframetest.gd) — never wall-clock sleep
CI / no display Headless gate MANDATORY [headlesstestrunner.gd](scripts/headlesstestrunner.gd)
Save/UI regression Snapshot MANDATORY [snapshottester.gd](scripts/snapshottester.gd)
RPC without live peers Mock network MANDATORY [mocknetworkprovider.gd](scripts/mocknetworkprovider.gd)
Perf budget in CI Benchmark gate [performancebenchmarkrunner.gd](scripts/performancebenchmarkrunner.gd)
Orphans after suite Leak detect [memoryleakdetector.gd](scripts/memoryleakdetector.gd)
Edge input space Fuzz [parameterfuzztester.gd](scripts/parameterfuzztester.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 [headlesstestrunner.gd](scripts/headlesstestrunner.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/snapshottester.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 [mocknetworkprovider.gd](scripts/mocknetworkprovider.gd) before standing up real peers.

Available Scripts

[basicunittest.gd](scripts/basicunittest.gd)

Minimal GdUnit4 (GdUnitTestSuite) structure for pure logic.

[signalemissiontest.gd](scripts/signalemissiontest.gd)

Signal emission monitoring for decoupled architectures.

[mockdependencytest.gd](scripts/mockdependencytest.gd)

Mocks/doubles to isolate external services.

[sceneintegrationtest.gd](scripts/sceneintegrationtest.gd) / [integrationtestbase.gd](scripts/integrationtestbase.gd)

Scene lifecycle + node interaction fixtures.

[headlesstestrunner.gd](scripts/headlesstestrunner.gd)

CI headless orchestration and exit codes.

[snapshottester.gd](scripts/snapshottester.gd)

Dictionary/UI golden snapshot comparison.

[mocknetworkprovider.gd](scripts/mocknetworkprovider.gd)

Loopback / offline multiplayer peer for RPC tests.

[performancebenchmarkrunner.gd](scripts/performancebenchmarkrunner.gd)

Microsecond timers + Performance monitor gates.

[memoryleakdetector.gd](scripts/memoryleakdetector.gd)

Orphan node detection across long suites.

[parameterfuzztester.gd](scripts/parameterfuzztester.gd)

Randomized ranges for edge crashes.

[waitforframetest.gd](scripts/waitforframetest.gd) / [physicscollisiontest.gd](scripts/physicscollisiontest.gd)

Frame/physics-step async verification.

[testdatafactory.gd](scripts/testdatafactory.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 waitforframe 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 [signalemissiontest.gd](scripts/signalemissiontest.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/snapshottester.gd)); regenerate reference PNG on approved visual changes.
  • CI: --headless + OS.exitcode non-zero on failure ([headlesstestrunner.gd](scripts/headlesstest_runner.gd)).
  • Network: mock peer before real ENet (mocknetworkprovider.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.