Troubleshoot Espresso setup issues with App Accessibility
Learn how to resolve issues where App Accessibility automated test reports fail to generate after running Espresso tests.
Use this guide to troubleshoot Espresso setup issues that prevent App Accessibility from generating automated test reports.
Issue
App Accessibility automated test reports fail to generate after you run your Espresso tests.
Cause
The BrowserStack Gradle plugin automatically injects the required SDK dependency, internet permission, and network security configuration into your app at build time. If these configurations are missing from your project — for example, if the plugin is not applied correctly or if the injected configurations were excluded — the reports will not generate.
Resolution
To resolve this issue, manually add the following configurations to your project:
Add the SDK dependency
In your project’s app/build.gradle file, add the BrowserStack SDK dependency in the dependencies block:
dependencies {
androidTestImplementation group: 'com.browserstack', name: 'browserstack-java-sdk', version: 'latest.release'
}
Enable internet access for the app
Open your app’s AndroidManifest.xml file and add the following entries to allow the test app to connect to the internet and use the HTTP protocol to send performScan requests:
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:usesCleartextTraffic="true"
...
</application>
After you add these configurations, rebuild your project and run your Espresso tests again. Check the App Accessibility testing dashboard to confirm that reports are now being generated.
Related links
- Integrate Espresso test suite with App Accessibility testing
- App Accessibility automated testing configuration options
- Troubleshoot report generation issues with automated tests
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!