Microsoft App Center Integration
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.
What You'll Need
- A Sauce Labs account
- A Microsoft App Center account
- A Project Source Code Repository
Creating the Post-Build Script
Link your project source code to your App Center project.
Create a script called
appcenter-post-build.sh
and add it to your project source code repository.If you're testing a cross-platform app using a framework such as React Native, add the following environment variables:
APP_NAME
andBUILD_NAME
. If you're building a single project (iOS or Android), skip to the last step.
#!/usr/bin/env bash
APP_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 app platform.
appcenter-post-build.sh
loading...
- You can optionally set a console message to appear in your App Center logs.
appcenter-post-build.sh
loading...
- 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 Centerappcenter-post-build.sh
loading...
- Push to EU Data Center
appcenter-post-build.shloading...
- Push to US Data Center
tip
Use the App Storage API to retrieve a specific build or obtain information regarding the build that ran during this operation.