In order to test your native and hybrid apps on BrowserStack using Appium, you first need to upload your app to BrowserStack servers. Its easy to upload an Android app (.apk or .aab file) or an iOS app (.ipa file) from your local filesystem or CI/CD server to BrowserStack using the REST API.
Here is an example cURL request to upload an Android app :
curl -u"YOUR_USERNAME:YOUR_ACCESS_KEY"\-X POST "https://api-cloud.browserstack.com/app-automate/upload"\-F"file=@/path/to/app/file/application-debug.apk"
A sample response to the above API request is shown below :
Please note the value of app_url in the API response (bs://f7c874f21852.... in the above example). This value will be used later to set the app capability to specify application under test in your Appium test scripts.
App upload will take a few seconds to about a minute depending on the size of your app. Do not interrupt the cURL command until you get the response back.
If you upload an unsigned version of android app, we sign them with our certificates before installing them to our devices. Similarly, whenever .aab files are uploaded, we convert them to universal APK and sign them with our certificates. When Browserstack resigns the apps, you won’t be able to use some features like Firebase, Google Maps etc because of android limitations. To avoid this, you can generate the apk and sign with your own certificates so that we avoid signing them on Browserstack.
If you upload an iOS app, we will re-sign the app with our own provisioning profile to be able to install your app on our devices during test execution. However, if your app is signed using the Apple Developer Enterprise Program, you can disable this behavior to test features such as push notifications on BrowserStack devices. To disable re-signing, set the browserstack.resignApp capability to false in your Appium test scripts.
You can also manage your uploaded apps by using our REST API. Use the recent apps API endpoint to list your recently uploaded apps.
You can delete your uploaded apps by using the delete app API endpoint.
By default, we will delete the uploaded app after 30 days from the date of upload.
Don’t see the language or framework you use? You can still run your tests. Contact Support for help.