Speed up test execution using single runner invocation
Learn how to speed up your XCUI and XCTestPlan test execution on BrowserStack App Automate using singleRunnerInvocation. Run tests on real device cloud.
The singleRunnerInvocation parameter is now supported for both XCUI tests and XCTestPlan tests, allowing you to speed up test execution across both testing approaches.
By default, each test case is invoked separately in a different process to produce segregated debugging logs for each test case. However, this process increases overall execution time for your build as each test case run spawns a new process. Alternatively, you can disable this behavior and execute all test cases together (on each device) in one process and still get segregated logs for individual test cases. This can help significantly speed up the test execution time and ensure improved consistency in execution times. To do so, you can use the singleRunnerInvocation parameter in the REST API request for XCUI tests or REST API request for XCTestPlan tests to start your test execution.
Enable single runner invocation
To enable single runner invocation for your XCUI tests or XCTestPlan tests, set the singleRunnerInvocation parameter to true in your REST API request when starting a build.
REST API endpoints:
POST /app-automate/xcuitest/v2/build
POST /app-automate/xcuitest/v2/xctestrun-build
| Parameter | Description | Values |
|---|---|---|
singleRunnerInvocation |
Execute test cases together in a single process. | true / false. Default: : false |
Example cURL request to start the execution of your XCUI tests:
Example cURL request to start the execution of your XCTestPlan tests:
singleRunnerinvocation, you can avoid test failure due to device disconnection by enabling the retry feature in the XCTestPlan configuration.
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
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!