
godot-testing-patterns
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.
- Installs
- 591
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-testing-patterns- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads godot-testing-patterns automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Decision Tree → Scripts
| Need | Choice | Script (MANDATORY when chosen) |
|---|---|---|
| Pure logic / no tree | Unit | basic_unit_test.gd, mock_dependency_test.gd, test_data_factory.gd |
| Node interaction after instantiate | Scene integration | scene_integration_test.gd, integration_test_base.gd |
| Signal contracts | Unit or scene | signal_emission_test.gd |
| Multi-frame / physics step | Async scene | wait_for_frame_test.gd, physics_collision_test.gd |
| Flaky physics / timing races | Frame step gate | MANDATORY wait_for_frame_test.gd — never wall-clock sleep |
| CI / no display | Headless gate | MANDATORY headless_test_runner.gd |
| Save/UI regression | Snapshot | MANDATORY snapshot_tester.gd |
| RPC without live peers | Mock network | MANDATORY mock_network_provider.gd |
| Perf budget in CI | Benchmark gate | performance_benchmark_runner.gd |
| Orphans after suite | Leak detect | memory_leak_detector.gd |
| Edge input space | Fuzz | parameter_fuzz_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 headless_test_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 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 mock_network_provider.gd before standing up real peers.
Available Scripts
basic_unit_test.gd
Minimal GdUnit4 (GdUnitTestSuite) structure for pure logic.
signal_emission_test.gd
Signal emission monitoring for decoupled architectures.
mock_dependency_test.gd
Mocks/doubles to isolate external services.
scene_integration_test.gd / integration_test_base.gd
Scene lifecycle + node interaction fixtures.
headless_test_runner.gd
CI headless orchestration and exit codes.
snapshot_tester.gd
Dictionary/UI golden snapshot comparison.
mock_network_provider.gd
Loopback / offline multiplayer peer for RPC tests.
performance_benchmark_runner.gd
Microsecond timers + Performance monitor gates.
memory_leak_detector.gd
Orphan node detection across long suites.
parameter_fuzz_tester.gd
Randomized ranges for edge crashes.
wait_for_frame_test.gd / physics_collision_test.gd
Frame/physics-step async verification.
test_data_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 wait_for_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 signal_emission_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 (snapshot_tester.gd); regenerate reference PNG on approved visual changes.
- CI:
--headless+OS.exit_codenon-zero on failure (headless_test_runner.gd). - Network: mock peer before real ENet (
mock_network_provider.gd). - Perf:
Performancemonitors / 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 |
| Release smoke checklist | 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
- Command line tutorial —
--headless,-s, and exit-code patterns for CI test runners. - Overview of debugging tools — debugger, profiler, and remote inspect when a failing test needs engine-side diagnosis.
- Custom performance monitors —
Performancemonitors and custom metrics for benchmark gates and orphan detection. - Idle and physics processing — frame/
_physics_processtiming thatwait_frames/ yield helpers must respect. - Using SceneTree — tree lifecycle,
quit(), and process modes used by headless orchestrators. - Nodes and scene instances — instantiate/add_child/free hygiene for scene integration tests.
- Instancing with signals — signal wiring patterns that signal-emission tests verify.
- High-level multiplayer — RPC/peer APIs mocked via OfflineMultiplayerPeer or latency simulators.
- Using InputEvent — synthetic
InputEvent*injection for fuzz and UI interaction tests. - Random number generation — seeding for deterministic fuzz and Monte Carlo harnesses.
- Saving games — serialize/deserialize patterns behind golden JSON and save/load integration tests.
- Physics introduction — layers/masks and step timing for collision integration tests.
Related Skills
Prerequisites
- godot-project-foundations — project layout, scenes, and resources before standing up a
res://test/suite. - godot-gdscript-mastery — typed GDScript,
await, and assert idioms used in every unit/integration test. - godot-signal-architecture — emit/connect contracts that
watch_signals/ signal monitors assert against.
Complements
- godot-debugging-profiling — profiler and ObjectDB tools when a red test needs runtime evidence, not another assert.
- godot-scene-management — scene packing/load patterns mirrored in scene integration fixtures.
- godot-input-handling — action maps and event parsing exercised by fuzz and UI press tests.
- godot-2d-physics — layer matrices and body APIs that physics collision tests must keep green.
- godot-resource-data-patterns — Resource schemas that test data factories and snapshot dictionaries serialize.
- godot-save-load-systems — persistence pipelines covered by save/load integration and golden-state tests.
Downstream / consumers
- godot-monte-carlo-balancer — seeded headless gameplay sims that reuse these harnesses for Phase 7 golden cells.
- godot-performance-optimization — budgets that CI performance gates (
Performancemonitors, draw-call caps) enforce. - godot-multiplayer-networking — RPC/replication logic validated through mock peers and lag injection.
- godot-export-builds — headless export/CI pipelines that invoke the same
--headlesstest entrypoints.
Master
- godot-master — library router and mirrored module entry for cross-skill discovery.
FAQ
What does the godot-testing-patterns skill do?
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.
How do I install godot-testing-patterns?
Run npx skills add https://github.com/thedivergentai/game-dev-agentic-skills --skill godot-testing-patterns in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/godot-testing-patterns/ (personal) or .claude/skills/godot-testing-patterns/ (project).
Which AI agents can use godot-testing-patterns?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is godot-testing-patterns safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains godot-testing-patterns?
It is published by thedivergentai in thedivergentai/game-dev-agentic-skills. It has 591 recorded installs.
More from thedivergentai/game-dev-agentic-skills
godot-master
thedivergentai/game-dev-agentic-skills
Consolidated expert library for professional Godot 4.7+ game and application development. Orchestrates 92 Domain Skills through architectural workflows, anti-pattern catalogs, performance budgets, and Server API patterns. Use when: (1) starting a new Godot project, (2) designing game or app architecture, (3) building entity/component systems, (4) debugging performance or physics issues, (5) choosing between 2D/3D approaches, (6) implementing multiplayer, (7) optimizing draw calls or script time, (8) porting between platforms, (9) migrating from 4.6 to 4.7. Primary entry point for ALL Godot development tasks. Keywords: Godot 4.7, AreaLight3D, HDR, Asset Store, godot-master.
godot-shaders-basics
thedivergentai/game-dev-agentic-skills
Expert Godot shader patterns for batch-safe hitflash, alpha-scissor foliage/dissolve, screenspace postFX, depth reconstruction, triplanar, and instance uniforms — not first-shader tutorials. Trigger on draw-call batching breaks, discard vs depth-prepass, foliage shadows, post-process quads, or world-position FX. Keywords: instance uniform, ALPHASCISSOR, hintscreentexture, hintdepthtexture, global uniform, sampler2DArray, canvasitem, spatial, post-processing.
godot-2d-animation
thedivergentai/game-dev-agentic-skills
Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs. Use when implementing sprite frame animations, procedural animation (squash/stretch), cutout bone hierarchies, or frame-perfect timing systems. Trigger keywords: AnimatedSprite2D, SpriteFrames, animationfinished, animationlooped, framechanged, frameprogress, setframeandprogress, cutout animation, skeletal 2D, Bone2D, procedural animation, animation state machine, advance(0).
godot-ui-theming
thedivergentai/game-dev-agentic-skills
Expert blueprint for UI themes using Theme resources, StyleBoxes, custom fonts, and theme overrides for consistent visual styling. Covers StyleBoxFlat/Texture, theme inheritance, dynamic theme switching, and font variations. Use when implementing consistent UI styling OR supporting multiple themes. Keywords Theme, StyleBox, StyleBoxFlat, addthemeoverride, font, theme inheritance, dark mode.
godot-gdscript-mastery
thedivergentai/game-dev-agentic-skills
Expert GDScript landmine guidance: static typing opcodes, signal-up/call-down, %UniqueName/@onready lifecycle, Callable bind/unbind, await sequences, typed collections, and safe Dictionary iteration. Use for code review, refactoring hot paths, or project standards. Trigger keywords: statictyping, signalarchitecture, uniquenodes, @onready, classname, signalupcalldown, Callable.bind, typedcollections, awaitsequence.
godot-particles
thedivergentai/game-dev-agentic-skills
Expert blueprint for GPU particle systems (explosions, magic effects, weather, trails) using GPUParticles2D/3D, ParticleProcessMaterial, gradients, sub-emitters, and custom shaders. Use when creating VFX, environmental effects, or visual feedback. Keywords GPUParticles2D, ParticleProcessMaterial, emissionshape, colorramp, subemitter, oneshot.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work