A volatile dependency either requires runtime-environment setup beyond a developer’s default installation or produces nondeterministic results. Databases, API services, random-number generators, and current-time providers are typical cases. section 2.1
Distinguish volatility from sharing:
- A database is both shared and volatile because it requires external setup and can be reused across tests. section 2.1
- A file system is shared but usually not volatile: it is commonly available and behaves deterministically, yet tests can interfere through its state. section 2.1
- A random-number generator is volatile because repeated invocations can return different results, even when tests do not share it. section 2.1
