This repository contains sample script of performance custom commands by using following JS frameworks
- WebDriver.IO
- Webdriver-Selenium with Mocha
- Protractor (Note: we don't recommend to use Protractor anymore as the project has been sunsetted)
-
Global Dependencies
$ brew install node
-
Sauce Credentials
- In the terminal export your Sauce Labs Credentials as environmental variables:
$ export SAUCE_USERNAME=<your Sauce Labs username> $ export SAUCE_ACCESS_KEY=<your Sauce Labs access key>
-
Project Dependencies
- Choose any of above framework (as example let's use Webdriver.io)
$ cd WebDriver.io
- Install Node modules
$ npm install
$ npm test
In demo app, we have performance_glitch_user
user to test performance regression. By using this user PageLoad time will be increased by 5s and existing test case will be failed.
$ npm run regression:test
- There may be additional latency when using a remote webdriver to run tests on Sauce Labs. Timeouts or Waits may need to be increased.