There are two main aspects of running NightWatchJS tests in the grid. The first aspect is initiating a test session and the other is running a test in parallel on multiple browsers.

There are two main aspects of running NightWatchJS tests in the grid. The first aspect is initiating a test session and the other is running a test in parallel on multiple browsers.

Initiating a Test Session

To initiate a test session and run a NightWatchJS test on the grid, certain capabilities must be specified in the Desired Capabilities object. The capabilities are:

  1. Authentication with NightWatchJS
  2. Cloud URL - the URL of the cloud.

In addition, the NightWatchJS test desired capabilities may include the following capabilities:

If the NightWatchJS test is configured to generate a report when the test is finished a detailed report will be created in SeeTest Reporter.


Below you can find an example written in Javascript specifying the capabilities above.

module.exports = {
  selenium : {
     start_process : false,
     selenium_host : '<cloudurl>',
	 server_path:'/wd/hub',
     selenium_port : <port>
   },
	
  test_settings : {
      default : {      //default environment
      selenium_port : <port>,
      selenium_host : '<cloudurl>',
      use_ssl : true,		//or false if the cloud doesn't use SSL
      desiredCapabilities : {
			browserName:'chrome',
			platformName:'mac',
            accessKey : '<ACCESS_KEY>',
            testName : 'NighwatchJSTest',
            javascriptEnabled : true,
			takeScreenshots : true,
            newCommandTimeout : 300,
            newSessionWaitTimeout : 300
			}
		}	
	 }	
};