Andrei Sorokin

Senior Engineer at Trade Republic

Talk Title

Compose UI Testing beyond layouts: journey to automated regression

Room

Things

Date

04.07.2024

Time

09:20 > 40 min

Share

on Twitter

Abstract:
The more apps scale, the more costly and tedious manual regression testing becomes. In this talk, I will share how we transitioned to automated regression testing in our 100% Compose app, focusing on reliability, developer experience, and cost-effectiveness.
Our journey begins by understanding our goals, constraints, and test strategy - what to test and how to do it. Then we’ll take a look at a sample compose UI test and define all of the things missing to achieve our goals.
We’ll start by setting app dependencies and opening a screen. Of course, when dealing with an actual screen the basic setup would quickly become too verbose. So we’ll go through defining a reusable way to find and interact with UI components and structure them into hierarchies.
Then we’d address mocking backend services, including complex with lots of calls and even websocket connections. We’d see why and how to build a nice DSL on top of MockWebServer to enable any scenario in a readable and maintainable way.
Then we’ll follow up with quickly revisiting our tests to make sure they’re stable and discuss common pitfalls that could affect your tests or production code.
In the end, we’ll briefly cover our infrastructure and how we run and collect reports to ensure the setup is cost-effective while keeping the best developer experience.

Speaker Bio

Senior Android Engineer building products that enable millions of people to build wealth. Android user since day one, passionate about app quality and clear UX.

Menu