---
title: Android Espresso Options
description: Various Android Espresso options to improve your tests.
source_url:
  html: https://testingbot.com/support/app-automate/espresso/options
  md: https://testingbot.com/support/app-automate/espresso/options.md
---

# Set Espresso Test Runner

By default, TestingBot will run your Espresso tests with `${packageName}/androidx.test.runner.AndroidJUnitRunner` (TestingBot substitutes `${packageName}` with your app's package id automatically).

If you have defined your own `testInstrumentationRunner`, you can pass this custom runner during the start Espresso call:

[CLI](https://testingbot.com#) [cURL](https://testingbot.com#)

```bash
testingbot espresso app.apk app-test.apk \
  --device "Pixel 6" \
  --platform-version "12" \
  --test-runner "${packageName}/customTestRunner"
```

```bash
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/espresso/:id/run" \
-d '{ "espressoOptions": { "testRunner": "${packageName}/customTestRunner" }, "capabilities":[{"version":"12", "deviceName":"Pixel 6", "platformName":"Android"}]}' \
-H "Content-Type: application/json"
```

Replace the `:id` with the identifier you received during the app upload call.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
