-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xUnit ITestOutputHelper output is not captured by .NET Test Log #6221
Comments
As a temporary workaround, when you click Starting test run
[Failed] Test.Integration.Submitter.PythonSubmitterFacts+SubmitAsync.DumpTheConfigAndFail
Message:
Assert.False() Failure
Expected: False
Actual: True
Stack Trace:
at Test.Integration.Submitter.PythonSubmitterFacts.SubmitAsync.DumpTheConfigAndFail() in /home/ltheisen/git/test/Test.Integration/Submitter/PythonSubmitterFacts.cs:line 37 Can be run with: dotnet test --filter 'FullyQualifiedName=Test.Integration.Submitter.PythonSubmitterFacts+SubmitAsync.DumpTheConfigAndFail' And that does still print the output written to |
This is very frustrating. Similar to what @lucastheisen mentioned, you can run the test with Example:
See docs for supported values. I thought that maybe adding this |
Upvoting this, I also need this feature as my test suite does not output anything in VSCode |
I've been using the "run test" CodeLens to run tests for small code snippets quickly and rapidly when needed, and everything was fine until recently I needed to do that again just to find out that I have no output at all. Excuse my ranting; But this is apparently due to "C# Dev Kit" abomination of an extension that broke everything since the day it appeared. It seems that I can install that extension, run my tests using the Test explorer there, and see my outputs in a different panel (which I have to manually focus every single time I run a test), but that is even more inconvenient than running the tests manually on console, plus I need to add and enable this bulky extension which makes everything act like it's in Visual Studio (and if I wanted that experience I wouldn't have used VSCode at all) |
this should be resolved in C# extensions version 2.48.31 or higher |
Type: Bug
Issue Description
When running a test XUnit ITestOutputHelper output is not being written to the .NET Test Log.
Steps to Reproduce
Create a test that uses ITestOutputHelper
In that test use ITestOutputHelper's WriteLine method
Run a test in VS Code
Expected Behavior
Text from WriteLine method will be output to the .NET Test Log
Actual Behavior
Text is not output to the .NET Test Log
Environment information
VSCode version: 1.81.1
C# Extension: 2.0.413
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 7.0.400 Commit: 73bf45718dRuntime Environment:
OS Name: Mac OS X
OS Version: 13.5
OS Platform: Darwin
RID: osx.13-arm64
Base Path: /usr/local/share/dotnet/sdk/7.0.400/
Host:
Version: 7.0.10
Architecture: arm64
Commit: a6dbb800a4
.NET SDKs installed:
6.0.300 [/usr/local/share/dotnet/sdk]
7.0.400 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/local/share/dotnet/]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.0.413
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:40:25.698Z)
OS version: Darwin arm64 22.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: