Test Controller for .NET Test Frameworks (MSTest, xUnit, NUnit)
- License free alternative to the C# Dev Kit
- Implements direct communication with
dotnet vstestclient application - Uses VSCode native testing API
- Test Discovery triggered when source dll is changed
- Source code navigation
- Debugging relies on
ms-dotnettools.csharp
| Property | Description |
|---|---|
dotnet-test-controller.project |
workspace-relative Project file path (.sln, .csproj) |
dotnet-test-controller.runSettings |
workspace-relative .runsettings file path |
dotnet-test-controller.buildConfig |
Build Configuration for the dotnet project (default: 'Debug') |
dotnet-test-controller.serverPort |
Port number for this extension server and vstest communication. It defaults to 0 to use any free port available |
dotnet-test-controller.debugConfig |
Options to use with the debugger. Use debug configurations as in launch.json attributes |
dotnet-test-controller.launcherConfig |
When present, connects to a remote computer using a launcher executable as a pipe that will relay standard input/output. |
dotnet-test-controller.sourceFileMap |
Optional source file mappings |
Minimal example (settings.json):
{
"dotnet-test-controller.project": "test/MyProjectTests.sln"
}
Integrated console example (settings.json):
{
"dotnet-test-controller.project": "test/MyProjectTests.sln",
"dotnet-test-controller.debugConfig": {
"console":"integratedTerminal"
}
}
Docker example (settings.json):
{
"dotnet-test-controller.project": "test/MyProjectTests.sln",
"dotnet-test-controller.buildConfig": "Debug",
"dotnet-test-controller.debugConfig": {
"pipeTransport": {
"pipeProgram": "docker",
"pipeArgs": ["exec", "-i", "dotnet-test", "sh", "-c"],
"debuggerPath": "~/vsdbg/vsdbg"
}
},
"dotnet-test-controller.launcherConfig": {
"launcherProgram": "docker",
"launcherArgs": ["run", "--rm", "--name", "dotnet-test", "--network=host", "<container>"],
},
"dotnet-test-controller.sourceFileMap": {
"path/to/source": "${workspaceFolder}"
}
}