A test that intermittently fails for no apparent reason is called a flaky test. Flaky tests usually work correctly on the developer’s machine but fail on the CI server. Flaky tests are difficult to debug and are a major source of frustration.
Common sources of flakiness are :
* Improperly handled concurrency.
* Dependency on test order within the test suite.
* Side effects in tests.
* Use of non-deterministic code.
* Non-identical test environments.