tamas-bazsonyi.jpg

Rock-Solid UI and Instrumentation Testing

Sinan Kozak

We Android developers use the "flakiness" word more than the "stability" word while talking about Espresso and Instrumentation tests. We cannot truly trust flaky tests. Instrumentation testing will continue to be part of our lives even with Jetpack Compose therefore, we need stability.

Running all UI tests before merging any code is possible, and it saves us a lot with 1000+ user interaction tests. Unfortunately, stability is not something that comes out of the box. A certain level of architecture, proper thread usage, and test setup with helper rules are required. There is an uncountable number of things that affect UI tests.

Good thing, there are explanations and solutions for most of the flakiness. In this talk, you will learn more about best practices to increase test stability, how to utilise Test-Driven Development with UI testing, and how this will help you find bugs earlier.