Setup multiple local connections for Maestro tests
Set up and manage multiple connections for local testing using Maestro. Test your apps on a real device cloud on BrowserStack App Automate.
You can test multiple forks and builds at the same time by setting up separate Local Testing connections for each. To do so, establish each Local Testing connection using the --local-identifier flag, along with a unique connection name (for instance, Test123).
Not using the --local-identifier flag for each Local Testing connection will cut off the existing connection and create a new one.
./BrowserStackLocal --key YOUR_ACCESS_KEY --local-identifier Test123
After establishing Local Testing connections, use the local and localIdentifier parameters when executing your build. The parameters are explained below:
| Parameter | Description | Values |
|---|---|---|
| local | Set this parameter if you want to enable Local Testing. | true/ false Default: false |
| localIdentifier | Set this parameter, if you are using the same account to test multiple applications. It helps to set up a named connection. | string Example: Test123 |
REST API request for Android:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/android/build" \
-d '{"local": "true", "localIdentifier": "Test123", "devices": ["Google Pixel 7-13.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"
REST API request for iOS:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/maestro/v2/ios/build" \
-d '{"local": "true", "localIdentifier": "Test123", "devices": ["iPhone 15-17.0"], "app": "bs://f5L3azt9pLzE995f49376eb1fa3c284dc321f8d", "testSuite": "bs://6eb1fa3c284ddbe9971b2d1aee0d52943b9c081"}' \
-H "Content-Type: application/json"
Manage multiple Local Testing connections
You can use the Local Testing API to check the status of (or disconnect) active binaries. However, your connections will not show up in the API response unless you establish them using the --enable-logging-for-api flag, as follows:
./BrowserStackLocal --key YOUR_ACCESS_KEY --enable-logging-for-api
For the available endpoints, see Manage Local binary instances.
For information on the supported APIs, refer to our REST API reference page.
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!