# What makes automated tests/checks flakey?

**URL:** <https://club.ministryoftesting.com/t/what-makes-automated-tests-checks-flakey/72173>\
**Category:** Discussions\
**Tags:** automation, continuous-learning, mot-icta\
**Created:** [2 December 2023 12:49 UTC](https://club.ministryoftesting.com/t/what-makes-automated-tests-checks-flakey/72173 "2023-12-02T12:49:51Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![christian.baumann](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/christian.baumann/32/14979_2.png) [@christian.baumann](https://club.ministryoftesting.com/u/christian.baumann)\
**Post date:** [8 April 2024 05:29 UTC](https://club.ministryoftesting.com/t/what-makes-automated-tests-checks-flakey/72173/21 "2024-04-08T05:29:43Z")

</div>

This is what I was able to come up with:

- Concurrency Issues: Tests affect each other when run in parallel, causing unpredictable outcomes, eg. two tests modify the same database record at the same time.
- Environmental Differences: Variability across testing environments leads to inconsistent test results, for example when tests pass on a developer’s local machine but fail in the CI/CD pipeline due to different software versions.
- Non-Deterministic Logic: Tests depend on elements that can change in value or behavior. Examples: Using the current date/time in tests, relying on random number generation.
- External Dependencies: Tests rely on external systems that may not always behave the same way, eg. a test fails because a third-party API it depends on is temporarily unavailable.
- Inadequate Test Isolation: Failure to keep tests independent of each other, sharing state or data. Example: One test’s outcome affects another because it doesn’t clean up created test data.
- Resource Contention: Tests compete for limited system resources, causing delays or timeouts. Example: Parallel tests exceed the available database connections, causing some to fail.
- Timing Issues: Tests make assumptions about execution time, which can vary, for example a test fails because it doesn’t wait long enough for a page to load in slower environments.

[Previous page](https://club.ministryoftesting.com/t/what-makes-automated-tests-checks-flakey/72173.md?page=1)
