r/androiddev • • Oct 31 '25

Maestro for testing

Hi all,

I'm working on an Android app that will soon become a KMM app.

My thought is to use Maestro for behavioral testing. I like that it's cross-platform, dead easy to learn, creates nice reports, and treats the app as a black box.

Just to clarify, this is one test:

  1. sign in
  2. open list of items
  3. open details of an item
  4. change details of the item

Mocking nothing, just spinning up a temporary instance of the backend with certain db dump.

The goal is to have the top of the pyramid run tests as a black box. To test all gold paths automatically before each release (so it takes a day, instead of a week of manual testing).

Haven't done this for a while, though.

Just for sanity checking, are you guys still doing this?

You guys using Maestro/Appium for it, or using Espresso, or something else?

4 Upvotes

5 comments sorted by

View all comments

7

u/TomatilloIcy3206 Oct 31 '25

We use maestro for exactly this. Black box testing the whole flow end to end, real backend, real data. Started with espresso but the cross platform thing sold us when we knew ios was coming. Plus espresso tests were getting flaky as hell and nobody wanted to maintain them.

Your flow looks exactly like what we test - sign in, navigate through screens, modify data, verify it saved. We spin up test instances of our backend with seeded data too. One thing that bit us early was timing issues between screens. Maestro handles most of it but sometimes you need explicit waits when your backend is slow or the app is doing heavy processing. We had this one flow where users upload documents and the processing time varies wildly based on file size. Had to add custom assertions to check for completion states.

The reports are clutch for debugging failures. When a test fails at 2am in CI you can actually see what happened instead of just getting some cryptic stack trace. We run our full suite nightly - takes about 3 hours for ~200 flows across android and ios. Catches so much stuff before it hits production. Last week it caught a payment flow that was broken on older android versions because someone changed a button id. Would've been a disaster if that shipped.