Find Tests for a Symbol
find_tests_forFind tests that likely cover a C# symbol from static evidence to identify what pins a change before editing and which tests to run after.
Instructions
Find the tests that likely cover a symbol, from static evidence (coverage_gaps: the reverse). Use it before a change (what pins it) and after (what to run). Only test-attributed methods count (default: Fact, Theory, Test, TestMethod, TestCase(Source)).
Returns items [{testType, testMethod, project, matchReason}] (+ 'testTypeFullName' where two read alike, 'logicalProject' where project ends in '(tfm)', 'raisedEvent' on an event raise), count, totalFound, truncated (max 50), invokesTotal, dispatchTotal (omitted at 0).
matchReason (11 tiers, sorted): 'invokes' (calls the target), 'invokes-via', 'command' (executes the target's command), 'command-via', 'accesses' (reads/writes the target property or field, or a type's static one), 'accesses-via', 'constructs' (builds the target type; type or constructor query), 'constructs-via' - strong, counted by invokesTotal (whole result) - then 'dispatch' (calls an interface/abstract/virtual member the target implements or overrides, or raises an event it handles; a double may have run), 'dispatch-via' (both counted by dispatchTotal) and 'name' (a guess: the test's or its class's name holds the symbol - for Type.Member, both).
Evidence reaches one call deep ('-via': through one method, constructor or getter the test calls). A 'note' says so on an empty answer or when a non-constructor answer's strong rows are all '-via', and names other pitfalls: an incomplete or unrestored run, an undeclared name or type segment (name noise), an event or enum member (name tier only), an unread qualified type name, a constructor query, no strong row, contract rows, construction rows (matched by simple name), overloads unioned, constant- and helper-only static readers left out, unread VB, F# or markup code. Also: 'generatedCodeNote' (its project or a referenced one lacks generated code), 'namesakes' (types sharing the name), 'nearest' (an undeclared name's close declared one).
Read-only.
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>",
"symbol": "<symbol>"
},
"name": "find_tests_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | The case-sensitive symbol to find covering tests for: a type's simple name, a member name bare or as 'Type.Member' (only that type's member), or 'Type.Type' for the constructor. A qualified type name ('Ns.Type', 'Outer.Inner') reads as the type where no type of that simple name lies outside it (a 'note' says so). | |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |