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.

Important: This document includes references to a third-party product, Nightwatch.js. The user interface and usage of third-party products are subject to change without notice. For the latest published information about Nightwatch.js, see https://nightwatchjs.org/guide/overview/what-is-nightwatch.html.

Run the sample

  1. Clone the sample project using the git clone command.
  2. Install dependencies using the npm install command.
  3. Provide your Perfecto security token and host information in the nightwatch.conf.js file, as follows:

    Copy
    const securityToken = 'My_SecurityToken',
      host = 'My_Host.perfectomobile.com';
  4. Run the tests with: ./node_modules/.bin/nightwatch