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

Specify application under test

Once you have uploaded your app to BrowserStack servers using the REST API, you are ready to execute your Appium tests on BrowserStack App Automate. The initial step is to appropriately cite your uploaded app by using the app capability.
As the tests are executed, BrowserStack will automatically retrieve and install your app on the specified target device(s). To facilitate this process, it is necessary to configure the app capability using one of the methods outlined below:

  1. Using an app_url value : This is returned in the response to an app upload REST API request.
  2. Using a custom_id value : This is the custom ID you defined in an app upload REST API request. By default, it will pick the last build of your uploaded app under the given custom ID.
  3. Using a shareable_id value : This is returned in the response to an app upload REST API request. It enables other users in your organization to test an app you uploaded.

If you are using BrowserStack SDK, you can set the following capabilities in the browserstack.yml file:

Capability Description Values
app Specify the app to test on. This is a required capability. For your uploaded app, use one of these values : <app_url> or <custom_id> or <shareable_id>
app_version If a custom ID value is being used to set the app capability, use this capability to test previous builds of your uploaded app under the same custom ID. This is optional. ‘-1’, ‘-2’ and so on. This will pick the latest-1, latest-2 etc. builds of your uploaded app to install during test execution

Example:

Use app_url to specify the app

browserstack.yml
Copy icon Copy

Use custom_id to specify the app:

browserstack.yml
Copy icon Copy

BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.

Capability Description Values
app Specify the app to test on. This is a required capability. For your uploaded app, use one of these values : <app_url> or <custom_id> or <shareable_id>
browserstack.app_version If a custom ID value is being used to set the app capability, use this capability to test previous builds of your uploaded app under the same custom ID. This is optional. ‘-1’, ‘-2’ and so on. This will pick the latest-1, latest-2 etc. builds of your uploaded app to install during test execution

Examples:

Use app_url to specify the app

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("app", "bs://9fg0rt302be241e6524ebc67253ecdee266343");
var capabilities = {
	'app': 'bs://9fg0rt302be241e6524ebc67253ecdee266343'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.SetCapability("app", "bs://9fg0rt302be241e6524ebc67253ecdee266343");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("app", "bs://9fg0rt302be241e6524ebc67253ecdee266343");
desired_cap = {
	'app': 'bs://9fg0rt302be241e6524ebc67253ecdee266343'
}
desired_caps = {
    'app': 'bs://9fg0rt302be241e6524ebc67253ecdee266343'
}

Use custom_id to specify the app:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("app", "MyCalculatorApp");
var capabilities = {
	'app': 'MyCalculatorApp'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.SetCapability("app", "MyCalculatorApp");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("app", "MyCalculatorApp");
desired_cap = {
	'app': 'MyCalculatorApp'
}
desired_caps = {
    'app': 'MyCalculatorApp'
}

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