test-gap-analysis
यह क्या करती है
यह स्किल प्रोडक्शन कोड में ऐसे व्यवहार ढूँढती है जो बिना किसी मौजूदा टेस्ट के फ़ेल हुए टूट सकते हैं। यह उन डेवलपर्स के लिए है जो जानना चाहते हैं कि उनके टेस्ट असली बग पकड़ पाएँगे या नहीं।
कब इस्तेमाल करें
- ✓जब आप जानना चाहते हैं कि किसी फ़ीचर में असली बग होने पर मौजूदा टेस्ट उसे पकड़ेंगे या नहीं।
- ✓जब आप किसी एक कंपोनेंट या जोखिम वाले हिस्से में बिना टेस्ट वाले व्यवहार ढूँढना चाहते हैं।
- ✓जब टेस्ट जोड़ने से पहले किसी संदिग्ध कमी को असली होने की पुष्टि करनी हो।
Skill का लिंक
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/test-gap-analysis/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“अगर चेकआउट कोड में डिस्काउंट कैलकुलेशन टूट जाए, तो क्या मेरे मौजूदा टेस्ट उसे पकड़ेंगे? कमियाँ ढूँढिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कोड जो परिणाम अपने कॉलर्स को दिखाता है उनकी सूची बनाता है, छोटे और वास्तविक बदलावों की कल्पना करता है, और देखता है कि कोई मौजूदा टेस्ट फ़ेल होगा या नहीं। माँगने पर भरोसेमंद कमियों की पुष्टि भी करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Test Gap Analysis
Answer one question: which caller-visible production behaviors could change without an existing test failing? Mutation reasoning is a probe, not the goal. Inventory public outcomes first, then verify only credible gaps.
Composition dispatch
Before entering the decision flow, check the caller's mode. An explicit
per-test-read-only request (including composition from grade-tests) uses
only references/per-test-read-only.md.
This mode is assessment context conveyed through the host's supported caller
instructions, not a new skill-loader parameter or a mode-specific skill name.
Read that reference and return its per-test assessment inline; do not enter
the standalone workflow below. Loading this mode does not authorize a
baseline run, mutation execution, file edits, suite discovery, or delegation.
If the bundled reference is unavailable, allow at most one listing of the known
references/ directory, then return N/A / unverified with the reason.
Requests without this mode retain the standalone analysis, verification, and test-addition paths below.
Decision flow
1. Set scope
Discover production and test files from manifests and file types. After a narrow search misses, inspect the current directory broadly before asking for paths.
| Request | Action |
|---|---|
| One component or named risk | Inventory every high-risk public outcome in scope; do not edit production code unless verification was requested |
| General small-component review | Inventory distinct outcomes and report caller-visible gaps from source/assertion mapping |
| Explicit survivor verification | Inventory all requested outcomes; execute one representative observable candidate for each distinct high-risk outcome under verification, then classify it as Survived or Killed |
| Explicit exhaustive audit | Read references/mutation-catalog.md and classify all meaningful candidates |
| Add tests to an existing suite | Analyze first; add tests only for verified survivors or demonstrated no-coverage outcomes |
| Create a new suite | Stop and use code-testing |
When the request names a risk, turn it into a one-line public-outcome allowlist
before reading code. An outcome is not in scope merely because the same method writes it.
For money math, allow computed or returned amounts, rates, tier/boundary
choice, percentage base/order, floors/caps, and rounding; exclude non-monetary
state predicates (including derived booleans), identity, and formatting. Private
code is in scope only to trace an allowed outcome.
Do not expand a focused request into a repository audit, plan artifact, or
dashboard. Use source and tests directly for familiar frameworks. When discovery
or assertion semantics are unclear, read the matching language file relative
to the caller-provided or runtime-listed test-analysis-extensions catalog;
do not invoke the reference-only helper or search installation directories.
If absent, state the limitation and use the pinned APIs and rules here.
2. Establish one baseline
For a source-only advisory review, skip execution and label empirical survival
unverified. A baseline is required when the user requests execution or survivor
verification, or when closing gaps with tests. Run the narrowest existing test
command once. Choose it from the project
manifest; Microsoft.Testing.Platform executables may require dotnet run.
Confirm tests executed: exit 0 with build-only output is not green. If that one
attempt cannot run the suite, do not troubleshoot the runner or try alternate
commands for an advisory review; continue statically and label all candidates
unverified. Do not infer a project-configuration cause from missing output;
name a cause only when the command reports it.
Missing runner output limits only claims of empirical mutation survival. It does not make source-proven facts tentative: a public outcome with no reaching test is still No coverage, and an exact expected value derived from the unmodified implementation is still actionable. State the baseline limitation once, then give the static source/assertion conclusion directly instead of hedging every row.
For an advisory review such as "would tests catch this?", stop execution after that baseline. Source-to-assertion mapping is sufficient evidence for No coverage and Candidate survivor (unverified). Trace or run the unmodified code once only
अक्सर पूछे जाने वाले सवाल
क्या यह छूटे हुए टेस्ट लिखती है?
केवल तब, जब आप कमियाँ भरने को कहें। नहीं तो यह उन्हें रिपोर्ट करती है।
क्या यह कोड कवरेज जैसा ही है?
नहीं। कवरेज बताता है कि कौन-सी लाइनें चलीं, जबकि यह स्किल जाँचती है कि व्यवहार असल में सुरक्षित है या नहीं।
क्या यह पूरे सॉल्यूशन को कवर करती है?
कर सकती है, पर केंद्रित नतीजे के लिए दायरा एक कंपोनेंट या जोखिम वाले हिस्से तक सीमित रखना बेहतर होता है।
जानकारी
लेखक का मूल विवरण
Find caller-visible production changes existing tests would miss through pseudo-mutation analysis; verify candidates or close gaps only when requested. Includes read-only per-test composition for grading. Polyglot. USE FOR: would tests catch a bug, behavioral blind spots, surviving mutations. DO NOT USE FOR: concrete fix/feature revision proof (test-value-evidence); suite taxonomy (test-tagging); .NET coverage, Cobertura, plateaus or coverage-backed priorities (coverage-analysis); named CRAP (crap-score); new suites (code-testing); assertion/smell audits; mutation tools.
repo: dotnet/skills
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14638
- लाइसेंस
- 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 पास कर सकें।