본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(18)

  • SKILL.md11.3 KB
  • references/expert-testing-patterns.md1.4 KB
  • references/manual-testing-checklist.md559 B
  • references/migration-notes.md3.6 KB
  • scripts/basic_unit_test.gd1.3 KB
  • scripts/headless_test_runner.gd2.2 KB
  • scripts/integration_test_base.gd2.1 KB
  • scripts/memory_leak_detector.gd1.3 KB
  • scripts/mock_dependency_test.gd1.3 KB
  • scripts/mock_network_provider.gd1.8 KB
  • scripts/parameter_fuzz_tester.gd1.2 KB
  • scripts/performance_benchmark_runner.gd1.3 KB
  • scripts/physics_collision_test.gd1.4 KB
  • scripts/scene_integration_test.gd1.2 KB
  • scripts/signal_emission_test.gd1.2 KB
  • scripts/snapshot_tester.gd1.9 KB
  • scripts/test_data_factory.gd1.1 KB
  • scripts/wait_for_frame_test.gd1.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Decision Tree → Scripts

NeedChoiceScript (MANDATORY when chosen)
Pure logic / no treeUnitbasic_unit_test.gd, mock_dependency_test.gd, test_data_factory.gd
Node interaction after instantiateScene integrationscene_integration_test.gd, integration_test_base.gd
Signal contractsUnit or scenesignal_emission_test.gd
Multi-frame / physics stepAsync scenewait_for_frame_test.gd, physics_collision_test.gd
Flaky physics / timing racesFrame step gateMANDATORY wait_for_frame_test.gd — never wall-clock sleep
CI / no displayHeadless gateMANDATORY headless_test_runner.gd
Save/UI regressionSnapshotMANDATORY snapshot_tester.gd
RPC without live peersMock networkMANDATORY mock_network_provider.gd
Perf budget in CIBenchmark gateperformance_benchmark_runner.gd
Orphans after suiteLeak detectmemory_leak_detector.gd
Edge input spaceFuzzparameter_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_code non-zero on failure (headless_test_runner.gd).
  • Network: mock peer before real ENet (mock_network_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.

TopicReference
Snapshot / CI / fuzz / perfexpert-testing-patterns.md
Release smoke checklistmanual-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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance fog, and a nearest-light shadow budget. Use when a 3D scene needs a sun, local lights, or fog on the camera. Keywords: DirectionalLight, PointLight, SpotLight, CascadeShadowConfig, DistanceFog, bevy_light.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay components. Use when a Bevy 2D game should gain a perspective camera, mesh draw, and a planar velocity lifted onto XZ. Keywords: Camera2d, Camera3d, Sprite, Mesh3d, StandardMaterial, WishVelocity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8732026년 10월 17일 업데이트

thedivergentai의 스킬 모두 보기

이 스킬의 문제 신고