-
Install nightwatch by running the command
npm install -g nightwatch -
SauceLabs account
-
Export the following two enviroment variables:
export SAUCE_USER=<user> export SAUCE_KEY=<key>Replace
<user>with the SauceLabs user id of the account created in 2.Replace
<key>with the SauceLabs key for the account created in 2 (can be found in the user profile). -
From the
tests/functionalfolder, run the following command:nightwatch --config nightwatch.json
- Copy the whole
testsdirectory to your GitHub repository
-
Create a new Stage to run the tests (you can name it
Functional tests) -
On the
Jobstab in the Stage configuration:-
click
Add Job -
select
SimpleforTester Type -
on the
Test scriptfield, add the following commands:npm install -g nightwatch cd tests/functional nightwatch --config nightwatch.json
Important: The commands above assume that you maintained the directory structure as in the sample. If you have a different directory structure, change the first command
cd tests/functionalaccordindgly. -
-
On the
Environment propertiestab, add the following properties (asText Property)SAUCE_USER <user>SAUCE_KEY <key>Replace
<user>with the SauceLabs user id of the account created.Replace
<key>with the SauceLabs key for the account created (this can be found in the user profile).
The configuration file (nightwatch.json) assumes that your test scripts will be on the scripts directory.
If your scripts are in a different folder, modify the following property in nightwatch.json (replace "scripts" with the directory where you have the test scripts):
"src_folders" : ["scripts"],