This is a playground environment to see what impacts tests running in parallel.
- .NET Core 3.0
In Visual Studio 2019, open Test Explorer and click Run All Tests
- Note: In the Test Explorer there is a setting of Run Tests In Parallel. Play around with this &
xunit.runner.json
From xUnit's documentation, this is the expected behaviour:
- Tests in same TestCollection (by default, a class) will run sequentially
- Tests in different TestCollections will run in parallel
- Assemblies will not run in parallel but can be changed via configuration
- Run tests in parallel in same assembly
- Run tests in parallel with other assemblies
- Does not run tests in parallel in same assembly
- Run tests in parallel with other assemblies
- Does not run tests in parallel in same assembly
- Does not run tests in parallel with other assemblies
Visual Studio 2019 parallel settings appears to completely ignore xunit.runner.json
- Disabling running in parallel, no assembly runs in parallel
- Enabling running in parallel, all assemblies run in parallel
Feel free to make an issue / PR for any mistakes I've made