Skip to content

saucelabs/performance-js-examples

Repository files navigation

extended-debugging-JS-examples

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)

Environment Setup

  1. Global Dependencies

    $ brew install node
    
  2. 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>
    
  3. Project Dependencies

    • Choose any of above framework (as example let's use Webdriver.io)
    $ cd WebDriver.io
    
    • Install Node modules
    $ npm install
    

Running Tests

$ npm test

Performance Regression Tests

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

Sauce Labs Dashboard

Advice/Troubleshooting

  1. There may be additional latency when using a remote webdriver to run tests on Sauce Labs. Timeouts or Waits may need to be increased.

Resources

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •