मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग33k · #8503

test-helpers

यह क्या करती है

यह स्किल गेम प्रोजेक्ट के लिए दोबारा इस्तेमाल होने वाला टेस्ट हेल्पर कोड बनाती है, जो उसके इंजन और सिस्टम्स से मेल खाता है। यह उन डेवलपर्स के लिए है जो बहुत सारे टेस्ट लिखते हैं और दोहराया गया सेटअप कोड कम चाहते हैं।

कब इस्तेमाल करें

  • ✓जब टीम टेस्ट सेटअप पूरा कर ले और टेस्ट लिखने के लिए साझा हेल्पर्स चाहती हो।
  • ✓जब डेवलपर्स हर टेस्ट में एक जैसा सेटअप और assertions दोहराते हों।
  • ✓जब नए इंजन टेस्ट फ़ोल्डर को शुरुआती हेल्पर फ़ंक्शन चाहिए हों।

Skill का लिंक

https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-helpers/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Godot प्रोजेक्ट के लिए टेस्ट हेल्पर्स बनाइए, ताकि हमारे टेस्ट में कम दोहराया गया सेटअप कोड हो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल प्रोजेक्ट का इंजन और भाषा जाँचती है, फिर इंजन के टेस्ट रनर द्वारा उपयोग किए जाने वाले फ़ोल्डर में सेटअप, assertions, factories और mocks की हेल्पर फ़ाइलें लिखती है। कुछ बदलाव करने से पहले वह पूछती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation

Automation mode: Resolve modes.automation (project.local.yaml → project.yaml → default collaborative). Every AskUserQuestion call and every file write follows .claude/docs/automation-modes.md (collaborative asks always · guided major-only · autonomous logs and proceeds; automation_always_ask categories always prompt).

Test Helpers

Writing test cases is faster and more consistent when common setup, teardown, and assertion patterns are abstracted into helpers. This skill generates a tests/helpers/ library tailored to the project's actual engine, language, and systems — so every developer writes less boilerplate and more assertions.

Output: engine-specific helper files in the engine's helper root — the only place its test runner compiles them (.claude/docs/directory-structure.md):

Engine Helper root
Godot tests/helpers/
Unity Assets/Tests/EditMode/Helpers/ — inside the EditModeTests assembly /test-setup creates. If PlayMode tests need the same helpers, ask before creating Assets/Tests/Helpers/TestHelpers.asmdef and referencing it from both test assemblies.
Unreal Source/<Module>/Private/Tests/Helpers/

tests/helpers/ below means the helper root for the project's engine.

When to run:

  • After /test-setup scaffolds the framework (first time)
  • When multiple test files repeat the same setup boilerplate
  • When starting to write tests for a new system

Assertions: use the project's test framework, never bare assert()

Generated helpers must assert through the configured test framework's assertion API, resolved from testing.framework — not through GDScript's built-in assert().

Two things go wrong with a bare assert() in a helper, and both are silent:

  1. It aborts the run instead of failing the test. A framework assertion records a failure and continues, so one broken expectation yields one red test. A bare assert() halts execution, so the first failure hides every result after it.
  2. It is stripped in release builds. A helper library built on assert() stops asserting entirely in exactly the build you most want checked, and does so without any error — the tests still "pass".

Look up the assertion form for the configured framework before generating code. Do not copy the forms in this file or in other skills' examples as authoritative — they are illustrative and have drifted (assert_eq, assert_true and assert_that all appear across the repo). If you cannot confirm the correct API for the project's framework, say so and generate no helper rather than guessing.

Helpers must not extend the framework's test-suite base class. A file in tests/helpers/ that extends the suite type is discovered by the runner as a test suite containing zero tests. Helpers are plain classes; only real test files extend the suite.


1. Parse Arguments

Modes:

  • /test-helpers [system-name] — generate helpers for a specific system (e.g., /test-helpers combat)
  • /test-helpers all — generate helpers for all systems with test files
  • /test-helpers scaffold — generate only the base helper library (no system-specific helpers); use this on first run
  • No argument — run scaffold if no helpers exist, else all

2. Detect Engine and Language

Read from project.yaml first, falling back to .claude/docs/technical-preferences.md for any key that is absent or empty:

  • engine.name (else the Engine: value)
  • engine.language (else the Language: value)
  • testing.framework (else Framework: from the Testing section)

If the engine is not configured in either source: "Engine not configured. Run /setup-engine first."


3. Load Existing Test Patterns

Scan the engine's test root for patterns already in use (Godot tests/, Unity Assets/Tests/, Unreal Source/<Module>/Private/Tests/):

Glob pattern="tests/**/*_test.*"                  (Godot)
Glob pattern="Assets/Tests/**/*Tests.cs"          (Unity)
Glob pattern="Source/*/Private/Tests/**/*.cpp"    (Unreal)

For a representative sample (up to 5 files), read the test files and extract:

  • Setup patterns (how before_each / setUp / fixtures are written)
  • Common assertion patterns (what is being asserted most often)
  • Object creation patterns (how game objects or scenes are instantiated in tests)
  • Mock/stub patterns (h
अक्सर पूछे जाने वाले सवाल

क्या यह किसी भी इंजन के साथ काम करती है?

यह प्रोजेक्ट के इंजन के अनुसार ढाली जाती है, जैसे Godot, Unity या Unreal, और हर इंजन का अपना हेल्पर फ़ोल्डर होता है।

क्या पहले टेस्ट सेटअप चलाना चाहिए?

हाँ। हेल्पर्स टेस्ट फ़्रेमवर्क पर बने होते हैं, इसलिए पहले टेस्ट सेटअप चलाना सबसे अच्छा है।

क्या यह मेरे लिए टेस्ट लिखती है?

यह बॉयलरप्लेट कम करने के लिए हेल्पर कोड लिखती है, जबकि टेस्ट खुद डेवलपर लिखते हैं।

जानकारी

लेखक का मूल विवरण

Generate engine-specific test helper libraries — assertion utilities, factory functions, mocks in the engine's test folder. Reduces boilerplate.

repo: Donchitos/Claude-Code-Game-Studios

लोकप्रियता

GitHub स्टार
33k
रैंकिंग में स्थान
#8503
लाइसेंस
MIT
अपडेट की गई
18/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

adopt

33k

जाँचती है कि किसी मौजूदा गेम प्रोजेक्ट के दस्तावेज़ स्टूडियो टेम्पलेट के फ़ॉर्मेट से मेल खाते हैं या नहीं, फिर कमियाँ ठीक करने के लिए क्रमांकित माइग्रेशन योजना लिखती है।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

architecture-decision

33k

किसी तकनीकी चुनाव के लिए आर्किटेक्चर डिसीज़न रिकॉर्ड लिखती है, जिसमें संदर्भ, विकल्प और परिणाम शामिल हैं, और सही तकनीकी भूमिकाओं से समीक्षा करवाती है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

architecture-review

33k

जाँचती है कि आपके तकनीकी फ़ैसले हर डिज़ाइन ज़रूरत को कवर करते हैं, आपस में टकराते नहीं और इंजन के वर्शन में फ़िट होते हैं, और साफ़ पास या चिंता वाला फ़ैसला देती है।

कोडिंगसामान्य कोडिंग

art-bible

33k

आपके गेम की विज़ुअल पहचान तय करने वाली आर्ट बाइबल लिखती है, ताकि एसेट बनाने का काम एक साफ़ शैली-नियम पर चले।

डिज़ाइनब्रांडिंग

मिलती-जुलती skills