Print command line and environment to manually run tests without overhead
Description
On some occasions when debugging i.e. intermittent issues or other things it's really useful to run tests faster without extra overhead of build related stuff. It would be good if we printed exact command line and environment needed to do so (i.e. only with -v or always, doesn't matter). That would save several minutes for me each time I need to do it.
Steps to reproduce
dotnet test -v [csproj]
Expected behavior
Build output showing something similar to:
===
Running tests:
CWD: working directory here
<environment variables setup here>
<path to runner.exe> <some args here>
===
ideally something I can copy & paste in current shell to get equivalent of what runner is doing without extra overhead.
Actual behavior
Need to figure that out myself.
dotnet test is simply forwarding the call to vstest.console.exe with translation of parameters. Have you tried to look at https://learn.microsoft.com/visualstudio/test/vstest-console-options?view=vs-2022 to see if you could find all arguments you need?
dotnet test --no-build