Skip to content

Commit e5b5a65

Browse files
Merge pull request #34 from browserstack/update_build_identifier
Update build Identifier
2 parents 3a2cd9e + 11127cb commit e5b5a65

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

browserstack.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
# =============================
22
# Set BrowserStack Credentials
33
# =============================
4-
# Add your BrowserStack userName and acccessKey here or set BROWSERSTACK_USERNAME and
4+
# Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and
55
# BROWSERSTACK_ACCESS_KEY as env variables
66
userName: YOUR_USERNAME
77
accessKey: YOUR_ACCESS_KEY
88

99
# ======================
10-
# Organizing your tests
10+
# BrowserStack Reporting
1111
# ======================
12-
# Use `projectName`, `buildName`, `name` capabilities to organise your tests
13-
# `name` is the name of your test sessions and is automatically picked from your
14-
# test name and doesn't need to be set manually when using BrowserStack SDK
15-
# `buildName` is used to name your CI/CD job or the execution of your test suite.
16-
# Ensure you add a dynamic identifier, like an incremental build number from your
17-
# CI/CD or timestamp at the end of every build; otherwise tests from different
18-
# executions will be grouped together on BrowserStack
19-
buildName: browserstack-build-1
20-
# Use `projectName` to set the name of your project. Example, Marketing Website
21-
projectName: BrowserStack Samples
22-
23-
# Use `framework` to set the framework of your project. Example, testng, cucumber, cucumber-testng
12+
# The following capabilities are used to set up reporting on BrowserStack:
13+
# Set 'projectName' to the name of your project. Example, Marketing Website
14+
projectName: BrowserStack Samples
15+
# Set `buildName` as the name of the job / testsuite being run
16+
buildName: browserstack build
17+
# `buildIdentifier` is a unique id to differentiate every execution that gets appended to
18+
# buildName. Choose your buildIdentifier format from the available expressions:
19+
# ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution
20+
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
21+
# Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests
22+
buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression}
23+
# Set `framework` of your test suite. Example, `testng`, `cucumber`, `cucumber-testng`
24+
# This property is needed to send test context to BrowserStack (test name, status)
2425
framework: cucumber-testng
2526

2627
# =======================================
@@ -37,10 +38,10 @@ platforms:
3738
osVersion: 10
3839
browserName: Edge
3940
browserVersion: latest
40-
- device: Samsung Galaxy S22 Ultra
41+
- deviceName: Samsung Galaxy S22 Ultra
4142
browserName: chrome # Try 'samsung' for Samsung browser
4243
osVersion: 12.0
43-
44+
4445
# =======================
4546
# Parallels per Platform
4647
# =======================
@@ -59,12 +60,13 @@ parallelsPerPlatform: 1
5960
# Set browserStackLocal to true if your website under test is not accessible publicly over the internet
6061
# Learn more about how BrowserStack Local works here -> https://www.browserstack.com/docs/automate/selenium/local-testing-introduction
6162
browserstackLocal: true # <boolean> (Default false)
62-
#browserStackLocalOptions:
63-
# Options to be passed to BrowserStack local in-case of advanced configurations
64-
# localIdentifier: # <string> (Default: null) Needed if you need to run multiple instances of local.
65-
# forceLocal: true # <boolean> (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel.
66-
# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections
6763

64+
# Options to be passed to BrowserStack local in-case of advanced configurations
65+
# browserStackLocalOptions:
66+
# localIdentifier: # <string> (Default: null) Needed if you need to run multiple instances of local.
67+
# forceLocal: true # <boolean> (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel.
68+
# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections
69+
6870
# ===================
6971
# Debugging features
7072
# ===================

src/test/java/com/browserstack/stepdefs/StackDemoSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class StackDemoSteps {
2525
public void setUp() throws MalformedURLException {
2626
MutableCapabilities capabilities = new MutableCapabilities();
2727
HashMap<String, String> bstackOptions = new HashMap<>();
28-
bstackOptions.putIfAbsent("source", "cucumber-java:sample-sdk:v1.0");
28+
bstackOptions.putIfAbsent("source", "cucumber-java:sample-sdk:v1.1");
2929
capabilities.setCapability("bstack:options", bstackOptions);
3030
driver = new RemoteWebDriver(
3131
new URL("https://hub.browserstack.com/wd/hub"), capabilities);

0 commit comments

Comments
 (0)