C
C#13mo ago
troll

✅ XUnit, ParallelTests, and HtmlReport (ExtentReports)

What's a good way to run ParallelTests with Xunit and ExtentReport (or other) ? My problem is that, I am using a collection to initialize and finalize the report, but since the tests are in the same collection, then I can't run the tests in parallel. I'm i doing something wrong ? Whats the recommended way ? Tried to google but not much luck
5 Replies
Joschi
Joschi13mo ago
There is a nugget that allows you to parallelize your tests. Sadly I can't remember the name right now.
Joschi
Joschi13mo ago
GitHub
GitHub - meziantou/Meziantou.Xunit.ParallelTestFramework: Run xUnit...
Run xUnit test cases in parallel. Contribute to meziantou/Meziantou.Xunit.ParallelTestFramework development by creating an account on GitHub.
phaseshift
phaseshift13mo ago
yes, xunit collections are to explicitly stop tests within them from being run in parallel
phaseshift
phaseshift13mo ago
xUnit.net
Running Tests in Parallel
Documentation site for the xUnit.net unit testing framework
troll
trollOP13mo ago
thank you both 💙 I am not sure how to choose an answer, or if there is such a feature. Both answers are useful I'll first try to change the default behavior using the second link, If it doesn't work, I'll do something similar to the first link. (I was thinking to create a TestRunner that creates and finalizes reports, and also runs the tests in parallel)
Want results from more Discord servers?
Add your server