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

find-untested-sources

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

यह स्किल उन source फ़ाइलों को खोजती है जिन्हें कोई test फ़ाइल संदर्भित नहीं करती, code के त्वरित स्कैन से, पूरे build के बजाय। यह उन डेवलपर के लिए है जो बड़े codebase में अगला test कहाँ लिखें, यह तय कर रहे हैं।

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

  • ✓जब आप नए tests लिखने से पहले उन source फ़ाइलों की सूची चाहें जिनके tests नहीं हैं।
  • ✓जब आप जानना चाहें कि repository की संरचना में नई test फ़ाइल कहाँ जानी चाहिए।
  • ✓जब बड़े codebase को यह त्वरित नक्शा चाहिए कि कौन सी फ़ाइलें tests से कवर हैं।

Skill का लिंक

https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/find-untested-sources/SKILL.md

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

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

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

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

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

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

“मेरी कौन सी C# source फ़ाइलों के अभी तक कोई tests नहीं हैं? सुझाइए कि उनकी test फ़ाइलें कहाँ होनी चाहिए।”

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

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

एजेंट source फ़ाइलों को बिना build किए पार्स करता है, घोषित types को test फ़ाइलों से मिलाता है, और बिना tests वाले sources को सुझाए गए test स्थानों के साथ सूचीबद्ध करता है।

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

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

Find Untested Sources

Purpose

Coverage tools answer "which lines were executed?" — they require a green build and a passing test run, which is minutes-to-tens-of-minutes on a real repo. The question this skill answers is different and much cheaper:

Which source files have no test file referencing any of their declared types/symbols?

That's the question an agent asks before writing a new test — and it can be answered statically in a few seconds by parsing source files, with no build, no dependency resolution, and no compilation. The output is a deterministic test-pairing map that lets the agent pick the next file to test without reading the entire codebase first.

Two engines — pick one

This skill ships two interchangeable analyzers with a compatible JSON contract:

Engine Script Use when
Roslyn (C#) scripts/Find-UntestedSources.cs The repo is .NET-only. Parses every .cs file with the Roslyn syntax API and does strict namespace disambiguation, so it is materially more accurate on duplicated short names like Settings or Context.
tree-sitter (polyglot) scripts/find_untested_sources.py The repo is not exclusively C#, or you want one tool across C#, Python, TypeScript/JavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++.

For a .NET-only repository, prefer the Roslyn engine — its namespace-aware pairing beats the polyglot engine's identifier overlap.

Required workflow

  1. Use the narrowest repository or package root named by the caller. Do not scan a parent workspace when the request identifies a subdirectory.
  2. Execute the appropriate analyzer once. Do not replace analyzer execution with manual globbing, filename matching, or visual inspection. For polyglot analysis, pass --include-tested when the answer must distinguish paired sources from unpaired sources. "Static pairing only" prohibits compiling the target repository and running its tests; it does not prohibit launching this skill's parse-only analyzer. State that distinction briefly when the caller also says "do not build." Treat analyzer dependencies as environment prerequisites: do not install packages, try the wrong engine, build the repository, or fall back to a manual scan when an analyzer invocation fails. Report the prerequisite failure instead.
  3. Base the result on the analyzer's JSON. Preserve its paired/unpaired classification and suggested relative path; do not guess a different path.
  4. When the caller named a subdirectory, prefix analyzer-relative paths with that subdirectory so reported paths are workspace-relative.
  5. Report the requested result plus the static-pairing coverage caveat. Do not append build, package-install, test-run, or coverage commands. When paired sources exist, name their covering test files so the unpaired classification is auditable.

When to Use

  • User asks "where should I add tests based on source pairing?", "which files have no tests?", "find unpaired source files", or "give me a static test gap list".
  • Before invoking a test-generation agent, to produce a source-pairing worklist.
  • After generating tests, to verify each new test file pairs to a source file.
  • To enumerate "weakly paired" source files (only one referring test) for follow-up depth checks.

When Not to Use

  • Line/branch coverage — use coverage-analysis.
  • Priorities derived from real coverage data — use coverage-analysis.
  • CRAP-score / risk hotspots — use coverage-analysis.
  • Are existing tests strong? — use test-gap-analysis (mutation reasoning) or assertion-quality.

Roslyn engine (C#)

Prerequisites

  • .NET SDK that supports file-based apps (dotnet run script.cs). Pinned in the repo's global.json (SDK 11 preview or later).
  • No internet access required beyond the initial NuGet restore of Microsoft.CodeAnalysis.CSharp on first run.

Usage

# From the skill folder
dotnet run scripts/Find-UntestedSources.cs -- <repo-root> [--top N]

# Save the report
dotnet run scripts/Find-UntestedSources.cs -- <repo-root> > pairing.json

# Iterate the untested list, highest-API-surface first
$report = Get-Content pairing.json | ConvertFrom-Json
$report.untested | Select-Object -First 10 source, decl_count, suggested_test_path

Diagnostics go to stderr; JSON goes to stdout.

Output schema

{
  "repo": 
अक्सर पूछे जाने वाले सवाल

क्या इसे build या coverage डेटा चाहिए?

नहीं। यह बिना compile किए काम करने वाला static स्कैन है, इसलिए तेज़ है।

क्या यह line coverage देती है?

नहीं। line और branch coverage डेटा coverage टूल से आता है, और यह स्किल एक अलग सवाल का जवाब देती है।

यह कौन सी भाषाएँ कवर करती है?

यह C# को एक समर्पित analyzer से संभालती है, और Python, TypeScript और JavaScript, Go, Java और कई अन्य भी कवर करती है।

जानकारी

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

MANDATORY for static source-to-test pairing: find or list source files/modules without corresponding tests, or suggest test locations from repository structure. Invoke even for a tiny package; do not substitute manual globbing. Uses Roslyn for C#/.NET and tree-sitter for Python, TS/JS, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real line/branch/Cobertura data, coverage-backed test priorities, CRAP risk, or grading existing tests.

repo: dotnet/skills

लोकप्रियता

GitHub स्टार
5.8k
रैंकिंग में स्थान
#14629
लाइसेंस
MIT
अपडेट की गई
2/11/2026

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

0

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

कमेंट

  • …

इस repository की और skills

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