You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Clone the repo `git clone https://github.com/browserstack/browserstack-webdriverio-load-testing-sample.git`.
9
+
* Set `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` as environment variables with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)
10
+
* Run `npm i` to install the dependencies.
11
+
* Open the browserstack-load.yaml file and update it with the relevant load test configurations.
12
+
13
+
## Running your tests
14
+
15
+
- Run the given command to start your test: `npx browserstack-cli load run`.
16
+
17
+
## Notes
18
+
* You can view your test results on the [BrowserStack Load Testing dashboard](https://load.browserstack.com)
# Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY as env variables.
5
+
userName: BROWSERSTACK_USERNAME
6
+
accessKey: BROWSERSTACK_ACCESS_KEY
7
+
8
+
# ======================
9
+
# BrowserStack Reporting
10
+
# ======================
11
+
# The following parameters are used to set up reporting on BrowserStack Load Testing:
12
+
# Set 'projectName' to the name of your project. Example: 'Product ABC'. Tests under the same projectName will be grouped together.
13
+
projectName: Default Project
14
+
15
+
# Set 'testName' to the name of your test. Example: 'First Load Test'. Test runs with the same testName will be grouped together.
16
+
testName: Default Test
17
+
18
+
# ======================
19
+
# Set Load Configuration
20
+
# ======================
21
+
# The following parameters are used to set load configuration for your test:
22
+
# Set 'testType' to the type of load test that you want to execute. Example:'Playwright', 'Selenium'. This is a required parameter.
23
+
testType: WebdriverIO
24
+
25
+
# Set 'vus' to the maximum number of virtual users to simulate during the test.
26
+
vus: 2
27
+
28
+
# Set 'duration' to the total duration of the entire test, in minutes and seconds. The test will run infinite iterations until the duration is met. Example: '2m', '3m 40s'. This is not a required parameter.
29
+
duration: 1m
30
+
31
+
# Set multiple regions from which you would want to generate the load (percent should total 100 across all loadzones).
32
+
regions:
33
+
- loadzone: eu-central-1
34
+
percent: 100
35
+
36
+
# Set language to the programming language used in your project. Example: 'java', 'nodejs'.
37
+
# language: nodejs
38
+
39
+
# Set framework to the test framework used in your Selenium project. Example: 'testng'.
40
+
# framework: testng
41
+
42
+
# Add list of file paths under 'dependencies' to help set up the test environment by installing required packages. Example: path to 'pom.xml' for Java projects using Maven, path to 'package.json' for Node.js projects.
43
+
# Add list of file paths under 'testConfigs' to define which configuration files should be used to run tests. Example: path to 'playwright.config.ts' for Playwright (Node.js), path to 'testng.xml' for Selenium (TestNG).
44
+
files:
45
+
dependencies:
46
+
- package.json
47
+
testConfigs:
48
+
- wdio.conf.js
49
+
50
+
# Specify environment variables in the following manner.
51
+
# env:
52
+
# sources:
53
+
# - path/to/env/file
54
+
# env:
55
+
# - name: variable1
56
+
# value: value1
57
+
# - name: variable2
58
+
# value: value2
59
+
60
+
# Set 'headless' to false to run tests in headful mode. This option is supported only when testType is set to WebdriverIO or Playwright.
0 commit comments