From d2fe5cf9cc24bb8639f8746c4b4068197c181e2b Mon Sep 17 00:00:00 2001 From: Arjun Krishna Vasisht Date: Tue, 4 Oct 2022 17:57:09 +0530 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 87306ee..b957f29 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,26 @@ gradle executeDebugTestsOnBrowserstack -PskipBuildingApks=true accessKey: String configFilePath: String # Filepath that has capabilities specifed to run the build +#### Browserstack CLI task +Acts as a wrapper around the browserstack CLI and allows the operation of the CLI directly from gradle (Available from version 3.1.0) + +##### Gradle command + +` +gradle browserstackCLIWrapper -PcliCommand="browserstack-cli-command-goes-here" +` + +Example usage + +``` +gradle browserstackCLIWrapper -PcliCommand="app-automate espresso run -a local-path-to-app-apk -t local-path-to-test-suite-apk" +``` + +You can refer to the existing browserstack CLI documentation [here](https://www.browserstack.com/app-automate/browserstack-cli) + +Any Browserstack CLI command can directly be passed to the -PcliCommand parameter and it would execute the CLI command from gradle and push the output to stdout/terminal + + > Note: username, accessKey and configFilePath are mandatory parameters. Visit https://www.browserstack.com/app-automate/espresso/get-started to get started with Espresso Tests on BrowserStack and also to know more about the above mentioned parameters. @@ -98,6 +118,8 @@ gradle executeDebugTestsOnBrowserstack -PskipBuildingApks=true > Note: You can also set the values of username and accessKey in environment variables with names BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY, respectively. If you do this, then there is no need to set this parameters in browserStackConfig block. +> Note: From version 3.1.0 onwards, usage of the Browserstack CLI task will download and install the latest version of Browserstack CLI on your machine. + ##### Internal steps 1. Build debug and test apks, as dependencies are declared on `assemble${buildvariantName}` and `assemble${buildvariantName}AndroidTest` tasks.