Functional Tests
- Execute Tests in Bamboo (Unless you are updating the functional tests and want to test your changes, the functional tests should be executed from our CI pipeline in Bamboo)
- view all of the jobs that have been run against Sauce Labs
Using Selenium Execute the following command which will open up the browser window(s) and execute the functional tests.
yarn functional-browser
Passing in the
environment
flag to thefunctional
andfunctional-browser
scripts determines which environment the functional tests will be executed against. Thelocal
value assumes you have the application running onlocalhost:8080
.yarn functional -- --environment uat --cat releaseSmoke
Problem running yarn functional-browser?
You may get an error reporting a missing fibers binary of
win32-x64-51
if you do, get a copy of the latest binaries e.g.npm install fibers
Configuration
Configuration is mainly done in wdio.core.js
, with additional config settings for local and sauce scenarios in wdio.browser.js
and wdio.sauce.js
.
If you want to override the core settings locally without affecting your git workspace, create a wdio.override.js
file and override any object params there.
This file should export an object:
exports.config = {
specs: [
'./src/tests/**/auto.js'
],
maxInstances: 1
};
Using Sauce Labs
- You can access your Sauce Labs account here: http://saucelab.com
- You will need to have your proxy configured properly.
- You will need the following environment variables set:
SAUCE_USERNAME
SAUCE_ACCESS_KEY
- Execute the following command:
yarn functional
- Passing in the
environment
flag to thefunctional
andfunctional-browser
scripts. You'll notice that yarn requires--
before any arguments are passed. To test local code with Sauce Labs, you need to add a localURL attribute to the
wdio.override.js
fileexports.config = { localURL: 'http://<YOUR IP AND PORT>' };