[solution]
Runs dotnet test (or dotnet vstest against prebuilt assemblies) under the workspace, captures stdout/stderr/TRX evidence, optionally reruns safe failures, and stores a GliderTrace test session.
Test failures need TRX and blame artifacts as well as summarized stdout and stderr.
The model can query structured test failure evidence and rerun identified failures when requested.
Try it locally in the GliderTrace playground
| Name | Type | Required | Description |
|---|---|---|---|
| targetPath | string | No | Optional solution, project, or directory path under the workspace root. Defaults to the workspace root. Not valid with runner 'vstest'. |
| configuration | string | No | Build configuration passed to dotnet test. Defaults to Release. Not valid with runner 'vstest'. |
| filter | string | No | Optional dotnet test filter expression. With runner 'vstest' it is applied as --TestCaseFilter. |
| verbosity | string | No | dotnet test verbosity: 'quiet', 'minimal', 'normal', 'detailed', or 'diagnostic'. Defaults to minimal. Not valid with runner 'vstest'. |
| noRestore | boolean | No | Pass --no-restore to dotnet test. Defaults to false so fresh workspaces can restore normally. |
| collectBlame | boolean | No | Collect blame sequence artifacts when supported. Defaults to true. |
| rerunFailed | number | No | Number of times to rerun safely identified failed tests. Defaults to 0. Rerun-cleared failures are recorded as flaky candidates. |
| runner | string | No | Test runner: 'auto' (default, dotnet test with mode detection), 'dotnet-test', or 'vstest' (dotnet vstest against prebuilt assemblies). 'nunit-console' and 'msbuild-vstest' are reserved for a future release. |
| assemblies | json | No | Prebuilt test assembly paths under a configured workspace root. Requires runner 'vstest'. |
| tests | json | No | Exact FullyQualifiedName test names, run through a vstest --TestCaseFilter so each name matches exactly. Requires runner 'vstest'; cannot be combined with filter or testCaseFilter. |
| testCaseFilter | string | No | VSTest --TestCaseFilter expression for trait/category selection. Requires runner 'vstest'. |
| testAdapterPath | string | No | Directory containing test adapters, mapped to vstest --TestAdapterPath. Requires runner 'vstest'. |
| platform | string | No | Target platform architecture for vstest: 'x86', 'x64', or 'ARM'. Requires runner 'vstest'. |
| framework | string | No | Target framework moniker for vstest, for example Framework48. Requires runner 'vstest'. |
| label | string | No | Optional short label for the stored session, for example nightly-baseline. Use it to find the session again with trace_list_sessions. Maximum 128 characters. |
Run tests for the current workspace
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trace_run_tests",
"arguments": {}
}
}Run a prebuilt legacy test assembly through vstest
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trace_run_tests",
"arguments": {
"runner": "vstest",
"assemblies": [
"Tests/bin/Debug/Sample.UnitTests.dll"
]
}
}
}Returns a test session id, result summary, TRX artifacts, stdout/stderr references, failure evidence, and rerun metadata.