Reputation: 11929
I'm using Visual Studio 2022, latest version, on .NET 6.
All test classes are marked with [Collection("Sequential")]
.
I'm running a single test from within Test Explorer (right click, debug test). Run tests in parallel menu item is disabled.
And yet, all tests are actually running in parallel.
I can tell this because my tests clear out test data and re-seed the database, before each test is run. When I run a single test, I can watch the database delete and re-insert data, so all the other tests are running in the background.
I'm pretty sure this has only just started happening in either the last or previous VS updates.
Is there anyway to turn this off, so that when I run 1 test, only 1 test runs?
Upvotes: 0
Views: 75
Reputation: 11929
In case anyone else has this issue:
I had an extension called 'Fine Code Coverage', that was executing the code in the background.
Upvotes: 0