Skip to content

Update build Identifier and source key #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: sdk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
# =======================
Expand All @@ -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 # <boolean> (Default false)
# browserStackLocalOptions:
# Options to be passed to BrowserStack local in-case of advanced configurations
# localIdentifier: # <string> (Default: null) Needed if you need to run multiple instances of local.
# forceLocal: true # <boolean> (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: # <string> (Default: null) Needed if you need to run multiple instances of local.
# forceLocal: true # <boolean> (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
# ===================
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/browserstack/BrowserStackTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public BrowserStackTest() {
public void setUp() throws Exception {
MutableCapabilities capabilities = new MutableCapabilities();
HashMap<String, String> 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:%[email protected]/wd/hub", userName, accessKey)), capabilities);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
Expand Down