Parallelism guide/FAQ
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 600
- Forks
- 158
- Avg merge
- 16h 8m
- Merged PRs (30d)
- 21
Description
We've seen a few examples of folks asking why parallelism isn't working for them and it turns out that they're not realizing that they're sharing mutable state between threads. Sometimes it's something global and static, sometimes it's mutable fixture instance state because they expect a new fixture instance per test case. It would be good to provide examples of how to keep state separated, and what not to do (SetUp/TearDown), and why.
Here's an overly-complex example for a real-world project where I refactored from SetUp/TearDown toa parallel-safe solution: https://github.com/nunit/nunit/issues/2105#issuecomment-325347460
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked NUnit issue comment and review the existing documentation structure to find the appropriate guide or FAQ location. Document examples of separated state, unsafe shared globals and fixture state, SetUp/TearDown concerns, and why the parallel-safe approach works. Done means the guide covers the requested cases with clear examples and explanations.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, testing
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100