Discovers test files and test functions that exercise specific code. Traces call graph edges to find functions with test-like names (test_, _test, it(), describe()) that directly or transitively call the target.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| uri | string | Yes | -- | File URI to find tests for (e.g., file:///path/to/file.ts) |
| line | number | No | 0 | Line number of the function (0-indexed). Omit or set to 0 to find tests for the entire file. |
| limit | number | No | 10 | Maximum number of related tests to return |
Natural Language:
"What tests cover the createUser function?"
MCP Tool Call:
{
"name": "stellarion_find_related_tests",
"arguments": {
"uri": "file:///home/dev/project/src/services/user.ts",
"line": 45
}
}
Returns: 4 tests: test_create_user_success, test_create_user_duplicate_email, test_create_user_invalid_input, and test_user_service_integration with their file locations and relationship types (direct caller, transitive).
Natural Language: "Which tests exercise anything in the payment module?"
MCP Tool Call:
{
"name": "stellarion_find_related_tests",
"arguments": {
"uri": "file:///home/dev/project/src/billing/payment.py",
"limit": 20
}
}
Returns: All test functions that call any function in the payment module, across all test files.
Natural Language: "Does this function have any tests?"
MCP Tool Call:
{
"name": "stellarion_find_related_tests",
"arguments": {
"uri": "file:///home/dev/project/src/utils/retry.rs",
"line": 12,
"limit": 1
}
}
Returns: Either 1 test (confirming coverage exists) or an empty array (no tests found).
get_detailed_symbol)direct (test calls the function directly) or transitive (test calls something that calls the function)limit)stellarion_get_edit_context which already includes related tests alongside callers, memories, and git history.stellarion_get_callees on the test function.