-
Notifications
You must be signed in to change notification settings - Fork 16
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
[BUG] VSCode test runner seems to ignore test collections / test fixtures #825
Comments
@ocallesp need to reproduce |
I was able to repro this bug with this sample project I created https://github.com/ocallesp/TestXUnitBug825 If we run all tests, Test Results will contain the following output: We can observe two things:
|
Assigning this to a member of the TestPlatform team since this seems to be related to test runner issue in xunit. |
@fhnaseer is there some work pending in here, or can we close this issue ? |
In Visual Studio 2022 this does not repro |
Milestone moved to January 2025 @fhnaseer what is pending in here ? |
Describe the Issue
I have unit tests that do integration tests with DynamoDB Local to test my database layer.
I use XUnit's test fixture pattern to instantiate a new table and tear it down once complete.
It works perfectly every time running "dotnet test" from the terminal in VS Code.
Running from VS Code's Test Explorer, tests randomly fail and if I set a breakpoint, multiple instances of my test fixture are being instantiated. It appears VS Code is running multiple instances of the test code in parallel when it is inappropriate to do so.
Steps To Reproduce
Expected Behavior
I would expect VS Code test runner to run tests identically to Visual Studio and "dotnet test".
Environment Information
Version: 1.85.1 (Universal)
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:48:06.308Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.0.0
C# v2.14.8
C# DevKit v1.1.16
This has happened under both .NET 6 and .NET 8
The text was updated successfully, but these errors were encountered: