CLI - App Automate (Beta)
The CLI provides a set of simple commands to upload apps, manage your test executions and much more. This guide will help you setup and use BrowserStack CLI for your automated mobile app testing.
BrowserStack App Automate allows you to manage your app testing on our cloud-based infrastructure by providing full integration with the command-line interface (CLI). Follow the steps below to setup BrowserStack CLI on your machine:
- Download the BrowserStack binary for CLI:
- Open your terminal and navigate to the folder containing the BrowserStack CLI binary.
- Make the BrowserStack CLI executable by running the following command:
- For MAC and Linux machines:
chmod +x browserstack
Give your users a seamless experience by testing on 2000+ real devices. To get started, run the command below to explore the list of available options.
$ ./browserstack [commands] [flags]
app-automate Automated mobile app testing on Real Mobile devices authenticate Set/Update your BrowserStack credentials help Help about any command update Update browserstack-cli to the latest version version Print the version number of BrowserStack CLI
--config Config file for your tests. Default: $HOME/.browserstack-cli.yaml -h, --help help for browserstack
To know more about any specific command, use the help flag as shown below
./browserstack [command] --help
Before you can upload an app or manage your test executions, you first need to authenticate yourself with your BrowserStack username and access-key. You can view your credentials on App Automate dashboard or Account Summary page
$ ./browserstack authenticate [flags]
--username To identify you as a unique user on BrowserStack account. You can fetch the info from https://www.browserstack.com/accounts/settings --access-key Private BrowserStack key associated with your account. You can fetch the info from https://www.browserstack.com/accounts/settings -h, --help Help for authenticate
./browserstack authenticate --username=your_username --access-key=your_access_key
Once authenticated, you can explore CLI for App Automate using the command below :
apps Manage your uploaded mobile apps on BrowserStack testsuite Manage your TestSuite for different Frameworks (Espresso/XCUITest/EarlGrey) espresso Run your Espresso mobile app tests xcuitest Run your XCUITest mobile app tests appium View and manage your appium tests executed on BrowserStack real devices. plan-status Get plan details - Number of parallels allowed, currently running and queued devices List of all Devices available for Testing