Stress testing¶
Category: Testing and tools · Status: stub · Lessons: chapter 09, Testing and tools (planned)
One line: Running concurrent code many times, under load and with many threads, so that rare interleavings get a chance to show up.
Also called: jcstress.
How it connects¶
- See also: Nondeterminism
In each language¶
| Go | go test -count n -cpu 1,2,4 ↗ repeats each test under several GOMAXPROCS values; stress ↗ runs a process in parallel in a loop to catch sporadic failures |
| Java | jcstress ↗, the OpenJDK harness and test suite for the correctness of concurrency support in the JVM, class libraries and hardware |
| Python | sys.setswitchinterval ↗ sets how often the interpreter switches between threads |
| Kotlin | Lincheck ↗ offers stress testing beside its model checking strategy |
Where to read more¶
- In the books: Distributed Systems with Node.js, Thomas Hunter II — ch. 8, 'Resilience' → 'Resilience Testing'