Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Speed up Espresso tests using single runner invocation

Run all Espresso test cases in a single test runner invocation to speed up builds on BrowserStack App Automate.

App Automate invokes each Espresso test case separately by default. Enable single runner invocation with the singleRunnerInvocation parameter when faster builds matter more than isolating each test case.

How single runner invocation works

Choose between the default execution mode and single runner invocation based on whether you need test isolation or faster builds:

  • Default: The test runner invokes each Espresso test case separately in its own instrumentation instance. This reduces shared state between test cases and improves overall stability. However, each test case spawns a new instrumentation process, which increases the overall execution time of your build.
  • Single runner invocation: All test cases run together with a single test runner invocation on each device. This can significantly reduce test execution time. App Automate automatically splits video recordings and debugging logs by test case.

Enable single runner invocation

To disable the default behavior and run all test cases with a single test runner invocation, set the singleRunnerInvocation parameter in the builds REST API request that starts your test execution.

Parameter Description Values
singleRunnerInvocation Execute test cases together with a single test runner invocation. true or false.
Default: false

The following example cURL request starts your Espresso tests with single runner invocation enabled:

Terminal
Copy icon Copy

Fail fast isn’t supported when single runner invocation is enabled, because there’s no boundary between individual tests at which execution can stop.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle