Skip to content

How to run XUnit tests in parallel with scope? #2924

Answered by bradwilson
A-Rai-col asked this question in Question
Discussion options

You must be logged in to vote

I have a sample that I believe does what you want. Attached below is the output I'm seeing. I have applied no sort order to the namespaces, so they're running in the order that they were discovered via reflection (or perhaps the order that LINQ chose to group them in), which is C => B => A. (I commented out all the Assert.Fail() calls because they were just adding noise to the output.)

I had to override a bunch of the execution pipeline so that things got flipped from sequential to parallel and parallel to sequential. The sample does not respect any of the fixture interfaces nor test collection definitions, but instead creates a test collection per namespace, and then uses that to ensure …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bradwilson
Comment options

Answer selected by A-Rai-col
@A-Rai-col
Comment options

@bradwilson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants