Find Test Coverage Gaps
coverage_gapsIdentify production methods with no direct test call and semantic axes declared absent in a C# solution or namespace, with reach depth to target real test gaps.
Instructions
List what is NOT covered in a scope: 'uncovered' - production methods no test code calls directly - and 'verifiedAbsent' - semantic axes a developer explicitly declared as 'none'. find_tests_for asks the opposite question for one symbol.
THE LIST IS ONE HOP, NOT A COVERAGE MEASUREMENT: a method a test reaches THROUGH another method is listed although exercised. Read each entry's testReachDepth: the hops to the nearest directly called method (1 = one of those calls it), ABSENT when no test reaches it: the real gaps. The walk follows interface, abstract and virtual dispatch; an entry reached only that way carries viaDispatch. A missing depth is unknown, not measured, where marked: commandCreditRefused (a test may run its command beside another) or unfollowedAccessor (an unfollowed setter, indexer, event accessor or explicit interface getter calls it). outerType: the type a nested declaring type sits in.
Returns scope, a 'note' when uncovered is non-empty or no namespace matched, symbolsScanned, uncovered and verifiedAbsent (max 200 each), transitivelyReached, judgedUnits, testProjectsExcluded, testFixtureTypesExcluded, reachedOnlyThroughDispatch, commandCreditRefused and unfollowedAccessorCallers. uncovered is sorted by type and name; on a large scope the cap cuts alphabetically, keeping one entry of each counted mark, so narrow it.
What counts: test code is every method of a test project, every test-attributed method and every method, constructor or getter of a type that declares one. Only ordinary methods are judged. A constructor is a hop (new X(...) reaches the bound overload and its callees), and so is a property read (into its getter). Abstract and interface declarations are excluded, and a weak test-name match does not count.
judgedUnits: the methods the list is drawn from, of symbolsScanned (0: no namespace matched); testProjectsExcluded and testFixtureTypesExcluded: what was set aside as test code.
Read-only. There is no test switch.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "coverage_gaps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | 'solution' (default) or a namespace prefix to narrow which symbols are checked, case-insensitive, matched on segment boundaries. | solution |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |