Automation Testing on Experitest cloud using Nightwatch JS

In our previous blog post, we have seen how we can use Nightwatch JS to execute tests using Javascript and Selenium. In today’s post we are going to make the small changes in the configuration file and make tests run parallel on selenium hosted on cloud environments like Experitest for example.

We are going to make small changes in test setting and configuration from what we had earlier and in my case the Experitest cloud url was globaldemo.experitest.com and you would have to use the accessKey for both authentication and authorization to connect to selenium grid and executing tests on the cloud. All such configuration can be made on nightwatch.json file, which could look something like this:

Once you replace the access key and value of Experitest cloud url then your tests execution should be good to go. And to test the same you can execute the tests using the following command:

npm test

Now, the tests should be running in parallel if you have more than one test on different browser, operating systems, and against different browser version too on Experitest cloud. Finally once test execution is completed, summary would be saved in reports folder or you can also have a look at reports on Experitest Reporter, which has synchronised video report, device logs and step wise execution which could be really helpful in identifying the root cause of test failure if it fails.

Let me know your thoughts on this article by commenting to this post, feel free to drop an email to naik899@gmail.com too.