# Running Specific Android UI Tests using TestParameterInjector via a Regex

DevFeed: [Running Specific Android UI Tests using TestParameterInjector via a Regex](<https://devfeed.tech/articles/running-specific-android-ui-tests-using-testparameterinjector-via-a-regex-25130.md>)

Original publisher: [Read original article](<https://handstandsam.com/2025/01/15/running-specific-android-ui-tests-using-testparameterinjector-via-a-regex/>)

Author: Sam Edwards

Published: 2025-01-15T14:49:13Z

Content type: tutorial

Language: en

Sources: [Handstand Sam](<https://devfeed.tech/sources/handstand-sam.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [on-device](<https://devfeed.tech/tags/on-device.md>), [regex](<https://devfeed.tech/tags/regex.md>), [tests](<https://devfeed.tech/tags/tests.md>), [updates](<https://devfeed.tech/tags/updates.md>)

## AI overview

This tutorial explains how TestParameterInjector generates parameterized Android instrumentation test names at runtime and why that makes selecting individual tests difficult. It discusses using the AndroidJUnitRunner tests_regex argument to target specific generated test names, while noting that class-level selection may run multiple parameterized cases.

## Source excerpt

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 [...]