Espresso Integration with BrowserStack
- Clone the repo
 - Download JDK8 from here
 - Update your JDK location via Project Structure (Android Studio)
- Go to File > Project Structure.
 - Select the SDK Location section in the list of the left.
 - Enter the absolute path of your installed JDK in the text box.
 
 - Build the main application: 
./gradlew assemble(apk will be generated in theapp/build/outputs/apk/debug/directory) - Build the test application: 
./gradlew assembleAndroidTest(apk will be generated in theapp/build/outputs/apk/androidTest/debug/directory) - Upload both the apk files to BrowserStack and start a session. Refer our documentation for details: Using Espresso with BrowserStack
 
- You can view your test results on the BrowserStack app-automate dashboard
 
- Customizing your tests on BrowserStack
 - Browsers & mobile devices for app-automate testing on BrowserStack
 - Using REST API to access information about your builds via the command-line interface
 - Using Espresso with BrowserStack
 - Generating JUnit XML report or Test coverage report using Espresso with BrowserStack.
example:
curl -u "< username >:< password >"
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build"
-d '{"app": "bs://<app_id>", "testSuite": "bs://<test_suite_id>", "devices": ["Google Pixel-8.0"], "coverage": true, "debugscreenshots": true }'
-H "Content-Type: application/json" 

