Flaky Tests | What are Flaky Tests and How to Prevent them ?
UI Automation is always challenging. Some of the reasons include
- Validation of different components and their behaviours
- Validation of structures with dynamic data
- Validation of dynamically changing content
- Validating async operations
And because of the complexity involved in automating the interactions with the components and the data associated with them, the tests are not stable, meaning that they don't fail or pass consistently. With UI Automation, unstable tests are a huge pain, because a lot of manual intervention would be required to check if it's an actual failure and identify why it failed now and not during the previous run, based on this a fix to make the test stable needs to be identified.
What are Flaky Tests?
Flaky tests are tests that fail or pass sometimes even though there are no code changes. Every test run yields a different result. This makes debugging the failure very difficult. This is a common problem in UI automation, and one of the main reasons why quality engineering teams do not rely 100% on UI automated tests.
