PhotoShelter Web Automation
To run tests locally:
$ yarn run test
To run tests against Saucelabs:
$ yarn run test-sauce
To run tests against browserstack
$ yarn run test-bs
If you want to run a single suite you simply pass the suite name as an argument:
$ wdio wdio.conf.local.js --suite login
It is possible to run multiple specific suites at one:
$ wdio wdio.conf.local.js --suite login,libris
$ brew install yarn
Install Selenium Drivers Locally
Selenium makes direct calls to the browser using the browsers native support for automation. The drivers are provided when using any cloud service. Drivers must be installed locally to run tests/develop locally.
Safaridriver comes with Safari versions 10+
Use Brew to install chromedriver.
$ brew install chromedriver $ which chromedriver /usr/local/bin/chromedriver
Use Brew to install Geckodriver (Firefox)
$ brew install geckodriver $ which geckodriver /usr/local/bin/geckodriver
. ├── README.md ├── package-lock.json ├── package.json ├── specs ├── src │ ├── pageobjects │ └── uimap ├── wdio.browserstack.conf.js ├── wdio.conf.js ├── wdio.conf.local.js └── yarn.lock
Make sure you have docker installed locally. Please see docker documentation for installation instructions.
- WebdriverIO - The webdriver bindings for Node.js
- Mocha - Test runner
- Chai - For the BDD Assertion Library
- yarn - Dependency Management
- Docker - Package Management
Browser/Platform Under Test
As part of a Definition of Done, it is expected that any new tests are run against browserstack. Two outcomes are expected on test failure:
- Developer Error: The test is fixed and passes before a PR & Merge.
- Bug: The test fails due to a bug, a jira bug ticket is then created.