Discover · handstandsam.com

Running Specific Android UI Tests using TestParameterInjector via a Regex

Handstand Sam handstandsam.com

There is documentation on the Android Developer website sharing tips to run Android UI tests via the command-line which I’ve found super useful. It provides examples on how to run specific tests (instead of running them all) including running by package, class or method. This documentation is fantastic, but it doesn’t include the tests_regex argument that is also available in the AndroidJUnitRunner.

I’ve recently I’ve been writing a lot of Android UI Tests using TestParameterInjector to support running the same test, but with run with different parameters. I’ve used the support for enum and Boolean values the most, but it also supports String, Int and others. This has been great, but it has also come with challenges in regards to how to run specific tests.

More ways to use this
Open on another device
Scan this QR code to open the same public page

Scan to open this page. Your saved notes and account access are not included.

Download QR code

Open the page link

In the piece

Named in it

Keep going

Each of these is read from what this estate already kept: the feed a piece came through, the publisher behind it, the credits and topics the publisher printed. None of it is a recommendation, an identity or a record kept anywhere else.

More like this

Also from Handstand Sam

  1. How I’m Using Agents for Development – January 2026Sam Edwards handstandsam.com
  2. LLM Based Android UI Testing – “Journeys with Gemini”Sam Edwards handstandsam.com
  3. Demystifying Maestro’s UI Testing ImplementationSam Edwards handstandsam.com
  4. Parameterized Android Tests with Burst 2.0Sam Edwards handstandsam.com
  5. Kotlin K2 FIR Quickstart GuideSam Edwards handstandsam.com
  6. Fetch and Render GitHub Markdown without CORSSam Edwards handstandsam.com