✅ Xunit v3 running test cases in parallel
Hello, tests are running in parallel, but not test cases.
One of my tests has to process more than 50 fixture files, and it currently runs synchronously. How can I make it run in parallel?
xunit.runner.json is also loaded
2 Replies
you cannot run multiple tests within a class simultaneously in xunit iirc - if you want them to run in parallel, you can do something along these lines iirc:
and then instantiate them all with 1 line each like so:
here's an example where I did this to get stuff to run in parallel: https://github.com/hamarb123/hamarb123.ByRefHandles/blob/main/hamarb123.ByRefHandles.Test/ByRefHandleTest.cs
Thanks for the help