Execute EarlGrey tests

After uploading the zip file of your .app directory, you are ready to run your EarlGrey tests on BrowserStack App Automate. Its easy to execute your tests using the REST API. Here is an example cURL request to start the execution of your EarlGrey tests :

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/earlgrey/build" \
-d '{"devices": ["iPhone 8 Plus-11"], "appDir": "bs://<hashed appid>", "deviceLogs" : "true"}' \
 -H "Content-Type: application/json" 

In the above example, the devices parameter is used to specify a list of iOS devices to test your app on. The appDir parameter is used to specify the zip file of the .app directory containing the app and test-cases uploaded to BrowserStack.

A sample response to the above API request is shown below :

{
    "message": "Success",
    "build_id": "741c219db523cb51d4cdf35723ce3bfc592fb74a"
}

The build_id returned in the API response is used to uniquely identify your test execution. Each test build is an execution of your EarlGrey test on all selected devices.

The test results are available on the command-line interface, as well as the App Automate dashboard.

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
Talk to an Expert