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.
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:
In addition, the NightWatchJS test desired capabilities may include the following capabilities:
newCommandTimeout - change the default timeout for each command in the test (default is 300 seconds)
In order to use Continuous Testing additional capabilities, you should use the following format:
testName : 'here is the test name', |
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 } } } }; |