Testing your app with Browserstack's App Automate
BrowserStack’s App Automate Espresso lets you test your native and hybrid apps on a variety of Android mobile and tablet devices. You can use App Automate in your Bitrise builds by utilizing our dedicated integration.
BrowserStack’s App Automate Espresso lets you test your native and hybrid apps on a variety of Android mobile and tablet devices. You can use App Automate in your Bitrise builds by utilizing our dedicated integration.
Setting up App Automate Espresso
To configure the Browserstack integration:
-
Make sure you have a Browserstack Username and Access key.
-
On Bitrise, open the Workflow Editor and add the Android Build for UI testing Step to your Workflow.
-
Make sure the Project location input points to the root directory of your Android app.
-
Set the module and the variant you want to build in the Module and the Variant input.
Gradle arguments
Optionally, you can pass additional Gradle arguments to the build task in the Additional Gradle Arguments input.
-
Add the BrowserStack App Automate - Espresso Step to your Workflow. It should follow the Android Build for UI testing Step.
-
Configure the required Step inputs:
Table 1. Step inputs for BrowserStack App Automate - Espresso StepInput group
Input name
Input value
Authentication
BrowserStack username
Your BrowserStack username in a string format.
BrowserStack access key
Your BrowserStack Access Key.
App & Test Suite
Android app under test
The path to your test APK file. By default. you don't need to modify it: the Android Build for UI testing Step exports the path as an Env Var which is used as the default value.
Espresso test suite
The path to your test suite file. By default. you don't need to modify it: the Android Build for UI testing Step exports the path as an Env Var which is used as the default value.
Devices
Devices
Set to one or more device-OS combinations in a new line.
You can find the possible combinations in this list.
-
Optionally, set advanced configuration options.
Advanced configuration for App Automate Espresso
The BrowserStack App Automate - Espresso Step provides advanced configuration options. All of these options are available in the Test configuration input group.
Input name |
Description |
Values |
---|---|---|
Filter tests |
Provide a comma-separated list of class or test names followed by supported filtering strategies. Only the filtered test cases will be executed. |
Key-value pairs of filters. Possible filters include: class, package, annotation, size. For example: |
Project name |
Provide a project name for the tests. You can logically group multiple Espresso test executions under a single project. This helps you easily access all related test executions on the App Automate dashboard on Browserstack. |
A string. Valid characters are: letters (A-Z, a-z), digits (0-9), periods (.), colons (:), hiphens (-), square brackets ([]), forward slashes (/), asperands (@), ampersands (&), single quotes (‘), and underscores (_). Any other characters are ignored. |
Test sharding |
Enable test sharding to split test cases into different groups instead of running them sequentially. |
Set key-value pairs to specify the number of shards and configure its behaviour. There are three types of sharding strategies, each requiring different configuration:
|
Single runner invocation |
Enable single runner inovcation to run all tests in a single instrumentation process to reduce overall build time. |
The default value is |
Local testing |
Enable Local testing to retrieve app data hosted on local/private servers. |
The default value is |
Mock server |
A mock web server mocks the behavior of an actual remote server. This makes it easy to test different scenarios without depending on your remote server and without having to make changes to your remote server. Local testing will not work with a mock server. |
The default value is |