
Running Specific Android UI Tests using TestParameterInjector via a Regex
Handstand Sam handstandsam.com
Listen to this summary
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 to open this page. Your saved notes and account access are not included.