Migrate your Espresso tests from Microsoft App Center
Use our Espresso Integration on App Automate to test on 3000+ devices on our real device cloud.
This applies if you use the CLI or the App Center task for Azure Pipelines to trigger Espresso tests on App Center.
Sign up for a BrowserStack account, then purchase an App Automate pricing plan.
You can use App Automate Espresso APIs to migrate from App Center to BrowserStack. Read more about the App Automate Espresso APIs before you begin. Migrating takes three API calls: upload your app, upload your test suite, and trigger the build.
Upload your app to BrowserStack:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/app" \
-F "file=@/path/to/app/file/Application-debug.apk"
Upload your test suite APK:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/test-suite" \
-F "file=@/path/to/app/file/Application-debug-test.apk"
Trigger the test execution with the relevant params using the Execute a build API.
You are probably using a CLI command such as the following to trigger tests on App Center:
appcenter test run espresso --app "user_org_key/App_key" --devices 36608302 --app-path PATH_TO_FILE.apk --test-series "main" --locale "en_US" --build-dir PATH_TO_ESPRESSO_BUILD_FOLDER
This CLI command has multiple parameters, such as APP_ID and DEVICE_SET_ID. Each of these CLI parameters has an equivalent param in the Espresso API. Check out the Execute a build API documentation for each param. Convert each CLI param to its API equivalent, then trigger the tests on BrowserStack using the Execute a build API. Once this API call completes, BrowserStack runs the Espresso tests:
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api-cloud.browserstack.com/app-automate/espresso/v2/build" \
-d '{"app": "bs://9c6dcb5649a8280ca800075bfd8f151115bba6b3", "testSuite": "bs://89c874f21852ba57957a3fdc33f47514288c4ba1","project" : "Espresso_Test", "devices": ["Samsung Galaxy S20-10.0","Google Pixel 7-13.0"]}' \
-H "Content-Type: application/json"
Espresso support on BrowserStack also works with Cucumber. Check out the Cucumber test documentation to learn more.
Alternatively, use our Gradle plugin. Check out the Gradle plugin documentation to learn more.
Further troubleshooting
There are certain core concepts in App Center, defined in App Center’s core concepts documentation. For each of these core concepts in App Center, there is an equivalent in BrowserStack:
- The core concept of Device Configuration in App Center is a combination of device model and operating system version. You can select the same device and OS version on BrowserStack too. Check out the device specification documentation to learn more.
- Similar to how App Center has Device Tiers, BrowserStack has Device Tiers too. Check out the Device Tiers documentation to learn more.
- The core concept of Device Concurrency in App Center maps to the concept of Parallels in App Automate.
- The core concepts of Test Run and Test Report equate to an Espresso session and its reports on BrowserStack. You can see your Espresso sessions on either the dashboard or using the API.
- The core concept of Test Series, an arbitrary system for organizing your test runs, maps directly to the Build Name in BrowserStack’s API params. BrowserStack also provides multiple other ways of organizing your tests. Check out the organize your tests documentation to learn more.
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!