You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I'm running MSTest through Azure Pipelines using a VSTest@3 task. I observe that the test output is only done in the case of a failure, but omitted completely in the case of a success. Is there a way to output the logs for a successful tests too?
And is there a way to get the live output of a test instead of only at the end?
The text was updated successfully, but these errors were encountered:
Is there a way to output the logs for a successful tests too?
Yes, dotnet test --logger:"console;verbosity=detailed".
dotnet test --logger:"console;verbosity=detailed" -tl:false
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\9.0.100-preview.2.24127.10\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierIn
ference.targets(314,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support
-policy [S:\t\mstest115\mstest115.csproj]
mstest115 -> S:\t\mstest115\bin\Debug\net9.0\mstest115.dll
Passed TestMethod1 [3s 2ms]
Outputs:
Standard Output Messages:
Hello,
World
Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: [3s 453ms]
And is there a way to get the live output of a test instead of only at the end?
Not yet, there is this env variable: VSTEST_EXPERIMENTAL_FORWARD_OUTPUT_FEATURE=1 which will forward the output from the process, but it depends on the test framework whether or not the output will reach console. In MSTest at least there is no way to suppress capturing the managed (via Console.Write or Console.WriteLine), so only native output would reach that forwarding.
The ability to disable capturing output was added MSTest and will be released in 3.4.0 microsoft/testfx#349
Currently I'm running MSTest through Azure Pipelines using a VSTest@3 task. I observe that the test output is only done in the case of a failure, but omitted completely in the case of a success. Is there a way to output the logs for a successful tests too?
And is there a way to get the live output of a test instead of only at the end?
The text was updated successfully, but these errors were encountered: