Skip to main content

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:

testingbot espresso app.apk app-test.apk \
  --device "Pixel 6" \
  --platform-version "12" \
  --test-runner "${packageName}/customTestRunner"
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.

Was this page helpful?
Last updated