Nightwatch.js
Our Nightwatch.js sample project on GitHub enables you to create a test script with Nightwatch.js that:
- Creates an instance of the ReportiumClient
- Defines tags for the report
- Specifies steps
- Returns the URL of the report
A sample script is available here.
For the complete Perfecto Smart Reporting NodeJS implementation and documentation, see the JavaScript section.
On this page:
Run the sample
- Clone the sample project using the
git clone
command. - Install dependencies using the
npm install
command. -
Provide your Perfecto security token and host information in the
nightwatch.conf.js
file, as follows:Copyconst securityToken = 'My_SecurityToken',
host = 'My_Host.perfectomobile.com';To generate a security token-
In the Perfecto UI at <YourCloud>.app.perfectomobile.com (where YourCloud is your actual cloud name, such as mobilecloud), click your user name and select My security token.
-
In the My security token form, click Generate Security Token.
-
Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto.
- Click Close.
-
- Run the tests with:
./node_modules/.bin/nightwatch