A fresh look for capability generator
We are excited to unveil a fresh look for capabilities, along with SDK configuration and improved navigation. Hope you love it as much as we do.
Capabilities
Capabilities are a series of key-value pairs that allow you to configure your tests on the BrowserStack cloud grid.
Use our Capabilities Generator to configure your test suite in the language of your choice. The capabilities generator lets you select from a comprehensive set of options you can use to customize your tests on the BrowserStack Cloud grid. You can also find out more about each capability by scrolling to our Capabilities Reference section.
Capabilities reference gist file
# =============================================================================================================================
# Set BrowserStack Credentials
# =============================================================================================================================
userName: YOUR_USERNAME
accessKey: YOUR_ACCESS_KEY
# Set 'framework' of your test suite. Example, 'testng', 'cucumber', 'cucumber-testng'
framework: testng # Required only for java based frameworks
# =============================================================================================================================
# Parallels per Platform
# =============================================================================================================================
# The number of parallel threads to be used for each platform set.
# BrowserStack's SDK runner will select the best strategy based on the configured value
#
# Example 1 - If you have configured 3 platforms and set `parallelsPerPlatform` as 2, a total of 6 (2 * 3) parallel threads
# will be used on BrowserStack
#
# Example 2 - If you have configured 1 platform and set `parallelsPerPlatform` as 5, a total of 5 (1 * 5) parallel threads
# will be used on BrowserStack
parallelsPerPlatform: 1
# =============================================================================================================================
# Android/iOS Application
# =============================================================================================================================
# Specify the app you want to test
# You can pass the app_url, custom_id or shareable_id obtained on uploading the app on BrowserStack
app: bs://5f5w7g3s5a9b5g6f39fk0 #passing app_url
app: CalculatorApp #Passing custom_id
app: exampleuser/CalculatorApp #Passing shareable_id
app: /path/to/app/file/application-debug.apk #Passing absolute path from your local filesystem
app: ./LocalSample.apk #Passing relative path
# Specify the app path with the custom_id
app:
path: /Path/to/app
custom_id: custom_id
# If you’re using custom_id or shareable_id for your app value, and you have different versions of the app,
# please use appVersion to configure which version your test needs to run on.
appVersion: 2.0
# =============================================================================================================================
# Platforms (devices to test)
# =============================================================================================================================
# Platforms object contains all the device combinations you want to test on.
# For Android Devices
platforms:
- platformName: android
deviceName: Samsung Galaxy S22 Ultra
platformVersion: 12.0
- platformName: android
deviceName: Google Pixel 7 Pro
platformVersion: 13.0
# For iOS Devices
platforms:
- platformName: ios
deviceName: iPhone 14 Pro Max
platformVersion: 16
- platformName: ios
deviceName: iPhone XS
platformVersion: 15
# =============================================================================================================================
# BrowserStack Reporting
# =============================================================================================================================
#Set 'projectName' to the name of your project.
projectName: BrowserStack Samples
#Set 'buildName' to the name of your project.
buildName: browserstack build
# buildIdentifier` is a unique id to differentiate every execution that gets appended to buildName.
# Choose your buildIdentifier format from the available expressions:
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
buildIdentifier: '${BUILD_NUMBER}'
# =============================================================================================================================
# Test Configuration Capabilities
# =============================================================================================================================
# Set browserStackLocal to true if mobile apps need to access resources hosted in development or testing environments
# during automated test execution.
browserstackLocal: true # <boolean> (Default true)
# Options to be passed to BrowserStack local in-case of advanced configurations
browserStackLocalOptions:
forceLocal: true # <boolean> (Default: false) Set to true to resolve all your traffic via BrowserStack Local tunnel.
localIdentifier: randomstring # <string> Needed if you need to run multiple instances of local.
proxyHost: 127.0.0.1
proxyPort: 8000
proxyUser: user
proxyPass: password
-pac-file: <pac_file_abs_path> #<string> Pass the absolute path of PAC file for proxy server related decisioning
f: /my/awesome/folder # <string> Pass the path of test HTML files on BrowserStack local.
appiumVersion: 2.0.0 #(select between multiple options) # Set the Appium version in your test scripts.
# For supported Appium versions, visit https://www.browserstack.com/app-automate/capabilities
idleTimeout: 90 # default timeout is 90 secs, it can be edited to higher(upto 300s) or a lower value for your tests
acceptInsecureCerts: true # <boolean> # Avoid invalid certificate errors while using self-signed certificate to test your app.
httpProxy: http://user:pwd@127.0.0.1:1234 #Add the proxy parameters in the adjacent format to use httpProxy
httpsProxy: https://user:pwd@127.0.0.1:1234 #Add the proxt parameters in the adjacent format to use httpsProxy
# =============================================================================================================================
# Debugging options
# =============================================================================================================================
video: true # <boolean> # Set to true enable video recording during your test
debug: true # <boolean> # Set to true to enable automatic screenshots for various appium commands
networkLogs: true # <boolean> # Set to true to capture network logs for your test
deviceLogs: true # <boolean> # Set to true to enable capture of device logs for your test
appiumLogs: true # <boolean> # Set to true to enable capture of raw appium logs for your test
captureContent: false # <boolean> # Set to true to capture response payload in network logs
# =============================================================================================================================
# Device Feature Capabilities
# =============================================================================================================================
# If you upload an iOS app to BrowserStack servers using REST API, Browserstack will re-sign the app with
# a self provisioning profile to install your app on our devices during test execution.
# This process will result in removal of entitlements from your iOS app. Set this capability to false to disable
# resigning of your Enterprise signed 'app' so that you can test features like, push notifications on BrowserStack devices.
resignApp: true # <boolean> # Only for iOS
customNetwork: 1000
networkProfile: 4g-lte-advanced-good #(select between multiple options) # Required if you want to simulate different network conditions
deviceOrientation: portrait # select between portrait/landscape # Set the screen orientation of mobile device
geoLocation: US #(select between multiple options) # Set to test how your app behaves in specific countries
timezone: New_York #(select between multiple options) # Configure tests to run on a custom time zone
language: Fr #(select between multiple options) #Set the language of the app under test
locale: Fr #(select between multiple options) #Set device locale
# =============================================================================================================================
# Appium Capabilities
# =============================================================================================================================
automationName: UIAutomator2 # Set the automation engine to use
# Supported values: UIAutomator2(Android Default), XCUITest(iOS Default), Appium, Flutter, YouiEngine, UIAutomator1
autoGrantPermissions: true # Set to true for Appium to automatically determine which permissions your app requires
#and grant them to the app on install.
newCommandTimeout: 60 #Set the value in seconds to wait for a new command before ending the session
# Note: All Appium supported capabilities can be used with BrowserStack SDK
# =============================================================================================================================
# Test Observability
# =============================================================================================================================
# Test Observability is an intelligent test reporting & debugging product. It collects data using the SDK.
# Visit observability.browserstack.com to see your test reports and insights. To disable test observability,
# specify `testObservability: false` in the key below.
# Read about what data is collected at https://www.browserstack.com/docs/test-observability/references/terms-and-conditions
# Check the available frameworks here: https://www.browserstack.com/docs/test-observability/overview/what-is-test-observability
testObservability: true
Capabilities Reference
Contact our Support team for immediate help while we work on improving our docs.