This topic describes how to migrate your apps from Microsoft App Center to a Sauce Labs Data Center by creating a post-build script in Microsoft App Center.
Link your project source code to your App Center project.
Create a script called
appcenter-post-build.shand add it to your project source code repository.
If you're testing a cross-platform application using a framework such as React Native, add the following environment variables:
BUILD_NAME. If you're building a single project (iOS or Android), skip to the last step.
#!/usr/bin/env bashAPP_NAME="your.app.name"# You can find this name in the build logs of a previous project.# For now, we'll create an empty variable and change it based on the# project that's using this script.BUILD_NAME="your.build.name"
Set the correct app name based on the application platform.
You can optionally set a console message to appear in your App Center logs.
Add the following command to push to the Sauce Labs Data Center that contains your target real device you want to test on.
- Push to US Data Center
- Push to EU Data Center
Use the App Storage API to retrieve a specific build or obtain information regarding the build that ran during this operation.