diff --git a/browserstack.yml b/browserstack.yml index 60466a0..dcb38d1 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -3,24 +3,26 @@ # ============================= # 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 - -framework: selenide-testng +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 +# 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 +# `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 +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: selenide-testng # ======================================= # Platforms (Browsers / Devices to test) @@ -36,10 +38,10 @@ platforms: osVersion: 10 browserName: Edge browserVersion: latest - - device: Samsung Galaxy S22 Ultra + - deviceName: Samsung Galaxy S22 Ultra browserName: chrome # Try 'samsung' for Samsung browser osVersion: 12.0 - + # ======================= # Parallels per Platform # ======================= @@ -58,12 +60,13 @@ parallelsPerPlatform: 1 # 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 # =================== diff --git a/src/test/java/com/browserstack/BrowserStackTest.java b/src/test/java/com/browserstack/BrowserStackTest.java index 139bc1b..769ad5f 100644 --- a/src/test/java/com/browserstack/BrowserStackTest.java +++ b/src/test/java/com/browserstack/BrowserStackTest.java @@ -35,7 +35,7 @@ public BrowserStackTest() { public void setUp() throws Exception { MutableCapabilities capabilities = new MutableCapabilities(); HashMap bstackOptions = new HashMap<>(); - bstackOptions.put("source", "selenide:sample-sdk:v1.0"); + bstackOptions.put("source", "selenide:sample-sdk:v1.1"); capabilities.setCapability("bstack:options", bstackOptions); driver = new RemoteWebDriver(new URL(String.format("https://%s:%s@hub-cloud.browserstack.com/wd/hub", userName, accessKey)), capabilities); driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));