Skip to content

Commit 4d0f8ae

Browse files
First commit
1 parent 0c49eff commit 4d0f8ae

9 files changed

Lines changed: 7870 additions & 0 deletions

File tree

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77
lerna-debug.log*
8+
log
89

910
# Diagnostic reports (https://nodejs.org/api/report.html)
1011
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -141,3 +142,9 @@ dist
141142
vite.config.js.timestamp-*
142143
vite.config.ts.timestamp-*
143144
.vite/
145+
146+
# Mac specific
147+
.DS_Store
148+
149+
#Playwright Specific
150+
test-results/

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# node-js-playwright-browserstack
2+
This repo contains samples for running WebdriverIO appium tests on BrowserStack using the browserstack-node-sdk using Playwright as Test Runner.
3+
4+
![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780)
5+
6+
## Setup
7+
8+
* Clone the repo `git clone -b sdk https://github.com/browserstack/node-js-playwright-browserstack.git` and run `cd node-js-playwright-browserstack`.
9+
* Set `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` as environment variables with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings) or update the same in `browserstack.yml` file.
10+
* Run `npm i` to install the dependencies.
11+
12+
## Running your tests
13+
14+
- To run the sample tests in parallel across the platforms specified in the `browserstack.yml`, run `npm run app-test`.
15+
16+
## Notes
17+
* You can view your test results on the [BrowserStack App Automate dashboard](https://www.browserstack.com/automate)
18+
* Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github)

browserstack.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# =============================
2+
# Set BrowserStack Credentials
3+
# =============================
4+
userName:
5+
accessKey:
6+
7+
# ======================
8+
# BrowserStack Reporting
9+
# ======================
10+
projectName: PW and WDIO Samples
11+
buildName: Playwright as Test runner for Wdio appium script
12+
buildIdentifier: '#${BUILD_NUMBER}'
13+
14+
# =======================================
15+
# Platforms (Browsers / Devices to test)
16+
# =======================================
17+
platforms:
18+
- platformName: android
19+
platformVersion: "12.0"
20+
deviceName: Samsung Galaxy S22 Ultra
21+
playwrightConfigOptions:
22+
name: S22Ultra
23+
- platformName: android
24+
platformVersion: "14.0"
25+
deviceName: Google Pixel 8 Pro
26+
playwrightConfigOptions:
27+
name: Pixel8Pro
28+
29+
# =======================
30+
# Parallels per Platform
31+
# =======================
32+
parallelsPerPlatform: 2
33+
34+
# ==========================================
35+
# BrowserStack Local
36+
# ==========================================
37+
browserstackLocal: false
38+
39+
framework: playwright
40+
source: node-js-playwright-sample-sdk:v1
41+
42+
# ===================
43+
# Debugging features
44+
# ===================
45+
debug: false
46+
networkLogs: false
47+
consoleLogs: errors
48+
49+
testObservability: true
50+
percy: false

0 commit comments

Comments
 (0)