code-testing
यह क्या करती है
यह स्किल नए tests लिखती है, टूटे या flaky tests ठीक करती है, और मौजूदा code के लिए regression tests जोड़ती है। यह उन डेवलपर के लिए है जिन्हें हाथ से सेटअप किए बिना बेहतर test कवरेज चाहिए।
कब इस्तेमाल करें
- ✓जब आपको ऐसे code के लिए नए tests चाहिए जिसके पास कोई test नहीं, या ऐसा test जो बग को वापस आने से रोके।
- ✓जब मौजूदा tests विफल हों, flaky हों या उन्हें मज़बूत जाँचों की ज़रूरत हो।
- ✓जब आप समर्थित test framework वाले प्रोजेक्ट में कवरेज की कमी भरना चाहें।
Skill का लिंक
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/code-testing/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी payment सेवा के लिए tests जोड़िए, जिसमें पिछले हफ़्ते ठीक किए गए refund बग के लिए एक regression test भी हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट code और मौजूदा tests पढ़ता है, framework के हिसाब से सही शैली चुनता है, cases लिखता है और चलाता है। बड़े काम पहले चरणों में योजना बनाकर होते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Code Testing Skill
The reliable implicit entry point for generating, repairing, and strengthening
tests. It handles focused work directly and invokes the public test-engineer
agent for broad or multi-stage requests.
Non-negotiable execution contract
Check pipeline ownership first. If the active agent is
test-engineer (including a plugin-qualified name such as
dotnet-test:test-engineer), or the caller assigned you a phase of
that pipeline, do not delegate to another generator. Continue the assigned
work inline. This guard takes precedence over every broad-scope delegation
instruction below, even if this skill was loaded automatically.
Classify scope before editing:
- Broad (a project/package-wide suite, or multiple production
files/modules): create
research.mdandplan.mdin a resolved non-stageable<TESTAGENT_DIR>before implementation, thenstatus.mdthere after the final test-quality review. Whentest-engineeris available, invoke that named custom agent before implementing; do not replace it with a generic subagent carrying the same label or implement the broad request inline. If the state files are absent, the broad workflow is incomplete. - Focused (the user explicitly limits work to one function/class/file or one missing method): do not create intermediate state files or fan out to multiple agents. A sparse project-wide request remains broad even when only one source module is present.
For either scope, run the narrowest relevant test command to a clean exit.
Always apply Report-safe test names and result validation,
including when the caller supplies conventions. Pass this contract to delegated
implementers/testers; preserve edge-case data and validate configured reports,
not just console output.
Keep the handoff proportional: for one to three focused requirements, use a
compact bullet list under a Requirement coverage label that names the tests
and successful command; for broader or multi-requirement work, use a
Requirement | Evidence table. Each requested behavior must cite an exact test
name.
Before sending a broad-scope final response, check that the response itself
contains | Requirement | Evidence | and exact test names for every behavioral
row. A table in a child report or internal plan is not enough. Do not summarize
away those names into module-level bullets or an Area | Tests table.
Intermediate state files are internal working data, never deliverables. Keep
<TESTAGENT_DIR> non-stageable, never place it or its files in
version-controlled workspace content, and never modify .gitignore to hide
them.
Treat completeness as a requirement matrix, not a test-count target. Give every independently requested state, boundary, error path, or interaction its own concrete assertion. Combine cases only when one execution genuinely proves the whole requested combination; do not let a parameterized happy-path case stand in for an empty state, invalid discriminator, or before/at/after boundary. For broad requests that name several production modules or layers, give each named module direct tests for its non-trivial public behavior. Cross-module tests prove composition, but do not substitute for the requested module-level coverage. Judge breadth by the behavior matrix, never by matching or exceeding a raw test count.
At the public entry point, delegate broad work to test-engineer
once. Research, plan, implementation, and review remain required, but they
need not be separate sub-agent calls.
Use only capabilities available in the current runtime. Do not retry a missing
skill under aliases or use another agent to retry a policy-denied operation.
Read language guidance directly from the caller-provided or runtime-listed
code-testing-extensions catalog and its matching language file. It is reference-only,
not an invocable skill. If the bundle is absent, use manifests and representative
tests and report the missing reference rather than searching installation dirs.
If scratch storage is denied, keep the research and plan in context, continue
permitted test edits, and report the missing state artifacts. If execution is
denied, continue permitted static review and report tests as unrun, never passed.
Neither blocker authorizes modifying production code or weakening requirements.
For a broad or comprehensive request, the explicit matrix is the floor, not the
अक्सर पूछे जाने वाले सवाल
क्या यह सिर्फ़ tests चलाती है?
नहीं। यह tests लिखती और ठीक करती है। अकेले tests चलाना एक अलग स्किल है।
क्या बड़े काम पहले योजना बनते हैं?
हाँ। बड़े या कई चरणों वाले काम tests लिखने से पहले योजनाबद्ध और दर्ज होते हैं।
कौन से frameworks समर्थित हैं?
यह xUnit, MSTest, NUnit, pytest, Jest, Vitest, Go और दूसरे frameworks के साथ काम करती है।
जानकारी
लेखक का मूल विवरण
ALWAYS USE for test work that requires changes: write, add, generate, repair, or strengthen tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework. Includes regression cases, failing or flaky tests, coverage-driven additions, and audit-then-fix requests. Focused work stays direct; broad or multi-stage work invokes test-engineer. DO NOT USE for only running tests, analysis-only audits, framework/platform migrations, a test blocked on a missing production seam (testability-obstacle), or MSTest API/configuration corrections that do not design new cases (wri
repo: dotnet/skills
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14624
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
create-custom-agent
5.8kयह आपके एजेंट को VS Code के custom agent फ़ाइलें बनाने देती है, जिनके अपने tools, निर्देश और दूसरे agents को handoffs होते हैं।
create-skill
5.8kयह आपके एजेंट को सही नाम, साफ़ trigger विवरण और मानक के अनुसार SKILL.md फ़ाइल वाली नई agent skill बनाने में मदद करती है।
csharp-scripts
5.8kयह आपके एजेंट को .NET command line टूल से एक छोटा C# प्रोग्राम एकल फ़ाइल के रूप में चलाने देती है, पूरा प्रोजेक्ट बनाए बिना।
dotnet-pinvoke
5.8kयह आपके एजेंट को .NET से native C या C++ libraries सही तरीके से कॉल करने में मदद करती है, जिसमें signatures, string संभालना, memory और सुरक्षित handles शामिल हैं।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।