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

Use self-signed certificates with your app during Espresso tests

Using self-signed certificates with your app during Espresso test executions on BrowserStack App Automate

If you are using a self-signed certificate to test your app, you may get invalid certificate errors during the execution of the tests. In order to avoid these errors, you need to pass the acceptInsecureCerts parameter in the REST API request to start Espresso test execution.

REST API endpoint:

 POST /app-automate/espresso/v2/build

The following table lists the parameter used to accept insecure certificates:

Parameter Description Expected values
acceptInsecureCerts Avoid invalid certificate errors while your test is running true or false
Default: false

Example cURL request:

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"acceptInsecureCerts": "true", "devices": ["Samsung Galaxy S8-7.0"], "app": "bs://f7c874f21852ba57957a3fdc33f47514288c4ba4", "testSuite": "bs://e994db8333e32a5863938666c3c3491e778352ff"}' \
-H "Content-Type: application/json"

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