Find Test Coverage Gaps
coverage_gapsLists production methods that no test calls directly and semantic axes declared as none, so you can find untested code and inspect test reach depth before claiming coverage.
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.
Use it to find untested code before claiming coverage. THE LIST IS ONE HOP, NOT A COVERAGE MEASUREMENT: a method a test reaches THROUGH another method is listed although it is exercised. So read each entry's testReachDepth: the hops to the nearest directly called method (1 = one of those calls it), ABSENT when no test reaches the method at all. Those are the real gaps. The walk follows interface, abstract and virtual dispatch; an entry reached only that way carries viaDispatch. commandCreditRefused: a test may run its command beside another, so its missing depth is unknown. 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 (at most 200 items each), transitivelyReached, judgedUnits, testProjectsExcluded, testFixtureTypesExcluded, reachedOnlyThroughDispatch and commandCreditRefused. uncovered is sorted by type and name, so on a large scope the cap cuts alphabetically: narrow the scope.
What counts: test code is every method of a test project, every test-attributed method and every method or constructor 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. A call from an accessor is not read. Abstract and interface declarations are excluded, and a weak test-name match does not count.
THE POPULATION IS DISCLOSED: judgedUnits is the methods the uncovered list is drawn from, out of symbolsScanned; testProjectsExcluded and testFixtureTypesExcluded count what was set aside as test code. symbolsScanned 0 means the scope matched no namespace.
Read-only. scope is 'solution' or a namespace prefix, case-insensitive, matched on segment boundaries. 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. | solution |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |