From 239962cd8407e51210be0ed82b375665930c60f2 Mon Sep 17 00:00:00 2001 From: Karan Shah <64479353+karanshah-browserstack@users.noreply.github.com> Date: Fri, 9 Dec 2022 15:14:44 +0530 Subject: [PATCH 1/2] Update build Identifier and source key --- browserstack.yml | 45 ++++++++++--------- .../BrowserStackJBehaveRunner.java | 2 +- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/browserstack.yml b/browserstack.yml index b835e9e..1b28d06 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -1,25 +1,27 @@ # ============================= # Set BrowserStack Credentials # ============================= -# Add your BrowserStack userName and acccessKey here or set BROWSERSTACK_USERNAME and +# Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and # BROWSERSTACK_ACCESS_KEY as env variables -userName: BROWSERSTACK_USERNAME -accessKey: BROWSERSTACK_ACCESS_KEY +userName: YOUR_USERNAME +accessKey: YOUR_ACCESS_KEY # ====================== -# Organizing your tests +# BrowserStack Reporting # ====================== -# Use `projectName`, `buildName`, `name` capabilities to organise your tests -# `name` is the name of your test sessions and is automatically picked from your -# test name and doesn't need to be set manually when using BrowserStack SDK -# `buildName` is used to name your CI/CD job or the execution of your test suite. -# Ensure you add a dynamic identifier, like an incremental build number from your -# CI/CD or timestamp at the end of every build; otherwise tests from different -# executions will be grouped together on BrowserStack -buildName: browserstack-build-1 -# Use `projectName` to set the name of your project. Example, Marketing Website -projectName: BrowserStack Samples -# Use `framework` to set the framework of your project. Example, testng, cucumber, cucumber-testng +# The following capabilities are used to set up reporting on BrowserStack: +# Set 'projectName' to the name of your project. Example, Marketing Website +projectName: BrowserStack Samples +# Set `buildName` as the name of the job / testsuite being run +buildName: browserstack build +# `buildIdentifer` is a unique id to differentiate every execution that gets appended to +# buildName. Choose your buildIdentifier format from the 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 +# Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests +buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression} +# Set `framework` of your test suite. Example, `testng`, `cucumber`, `cucumber-testng` +# This property is needed to send test context to BrowserStack (test name, status) framework: jbehave # ======================================= @@ -47,16 +49,17 @@ platforms: # Set browserStackLocal to true if your website under test is not accessible publicly over the internet # Learn more about how BrowserStack Local works here -> https://www.browserstack.com/docs/automate/selenium/local-testing-introduction browserstackLocal: true # (Default false) -#browserStackLocalOptions: -# Options to be passed to BrowserStack local in-case of advanced configurations -# localIdentifier: # (Default: null) Needed if you need to run multiple instances of local. -# forceLocal: true # (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel. -# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections +# Options to be passed to BrowserStack local in-case of advanced configurations +# browserStackLocalOptions: + # localIdentifier: # (Default: null) Needed if you need to run multiple instances of local. + # forceLocal: true # (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel. + # Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections + # =================== # Debugging features # =================== debug: false # # Set to true if you need screenshots for every selenium command ran networkLogs: false # Set to true to enable HAR logs capturing consoleLogs: errors # Remote browser's console debug levels to be printed (Default: errors) -# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors) \ No newline at end of file +# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors) diff --git a/src/test/java/com/browserstack/BrowserStackJBehaveRunner.java b/src/test/java/com/browserstack/BrowserStackJBehaveRunner.java index f6c7d2d..90f3966 100644 --- a/src/test/java/com/browserstack/BrowserStackJBehaveRunner.java +++ b/src/test/java/com/browserstack/BrowserStackJBehaveRunner.java @@ -34,7 +34,7 @@ public void setUp() throws Exception { accessKey = System.getenv("BROWSERSTACK_ACCESS_KEY") != null ? System.getenv("BROWSERSTACK_ACCESS_KEY") : (String) browserstackYamlMap.get("accessKey"); MutableCapabilities capabilities = new MutableCapabilities(); HashMap bStackOptions = new HashMap<>(); - bStackOptions.put("source", "jbehave:sample-sdk:v1.0"); + bStackOptions.put("source", "jbehave:sample-sdk:v1.1"); capabilities.setCapability("bstack:options", bStackOptions); try { this.driver = new RemoteWebDriver( From 8654e39cca2c1c705e01f2bf436642d3a3104346 Mon Sep 17 00:00:00 2001 From: Karan Shah <64479353+karanshah-browserstack@users.noreply.github.com> Date: Tue, 13 Dec 2022 21:32:42 +0530 Subject: [PATCH 2/2] Fix typo changes --- browserstack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browserstack.yml b/browserstack.yml index 1b28d06..9ce679c 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -14,8 +14,8 @@ accessKey: YOUR_ACCESS_KEY projectName: BrowserStack Samples # Set `buildName` as the name of the job / testsuite being run buildName: browserstack build -# `buildIdentifer` is a unique id to differentiate every execution that gets appended to -# buildName. Choose your buildIdentifier format from the the available expressions: +# `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 # Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests