Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

Steps needed to migrate Espresso Tests

  • This would apply in case you are using the CLI or App Center Task for Azure Pipelines to trigger Espresso tests on App Center
  • You would need to first signup for a BrowserStack Account here
  • Once you have signed up, you need to purchase a plan on BrowserStack. You can see all the plans here
  • You can use App Automate’s Espresso APIs to migrate from the App Center to BrowserStack. It would be as simple as performing 3 API calls with the relevant params to run all the tests on BrowserStack.
  • You can read more about the App Automate’s Espresso APIs here
  • The first of the 3 API calls mentioned above would be to upload the App
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"
  • The second of the 3 API calls mentioned above would be to upload the 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"
  • The last of the 3 API calls mentioned above would be to finally trigger the test with the relevant params that is the Execute a Build API

  • You would probably be using a CLI command like this - 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 like APP_ID & DEVICE_SET_ID
  • For each one of these CLI paramaters you can find an equivalent param for the Espresso API, you can find documentation on each param in the API over here
  • All you would need to do would be to convert each one of the CLI params to API params and then trigger the tests on BrowserStack using the Execute Build API.
  • The final API call would look something like this. Once this API call is done, BrowserStack will take care of running 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 3-9.0"]}' \
-H "Content-Type: application/json"
  • Espresso Support on BrowserStack is also available in case you are using Cucumber too. You can refer to this documentation for cucumber
  • Alternatively you can also use our Gradle Plugin . You can read more documentation on there here

Further Troubleshooting

  • There are certain Core Concepts in App Center defined here , for each one of these Core Concepts in App Center, there is one in BrowserStack. We are listing them down below
  • 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 & OS version you want on BrowserStack too. You can read more on that here
  • Similar to how there are Device Tier’s in App Center , there are Device Tiers in BrowserStack too , you can read more about them here
  • The core concept of ‘Device Concurrency’ in App Center will map to the concept of Parallels in App Automate
  • The core concept of ‘Test Run’ & ‘Test Report’ would equate to an Espresso Session & it’s Reports on BrowserStack. You can see your Espresso Sessions on either the Dashboard or you can use our API
  • The core concept of ‘Test Series’ which is an arbitrary system for organizing your test runs, maps directly to the ‘Build Name’ in BrowserStack’s API params. Also BrowserStack provides multiple other ways of organising your tests, you can read more on that here

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