Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

yes but resetting the environment before each test is one way to deal with them


>>> on one hand I suspect too much code has explicit and implicit global state for this technique to be useful ...

>> Any collaborations having observable side effects such as these are very difficult to prove correct, regardless the test approach employed.

> yes but resetting the environment before each test is one way to deal with them

Not really.

Resetting an environment for each test requires distinct tests exist for all anticipated workflow permutations. While this is onerous when the side effects are limited to in-process mutable state (such as global, session, and thread-local data), it is infeasible when global state is a persistent store[0].

0 - https://en.wikipedia.org/wiki/Data_store




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: