How to use Saucelaba with night glasses?

I have the following configuration in nightwatch.json file

"saucelabsChrome": { "selenium_host": "ondemand.saucelabs.com", "selenium_port": 80, "username": "example", "access_key": "--REDACTED---", "desiredCapabilities": { "acceptsSslCerts": true, "name": "chrome", "browserName": "chrome", "platform": "OS X 10.11", "version": "45.0" } }, 

However, when I launch the night falcon with the sauce labs

 node nightwatch ---args '{"beta": "true", "env": "stage"}' --test tests/example.js -e saucelabsChrome 

I get an error

 Couldn't find element signUpAdobe 

Two questions

  • Where can I see the nightwatch team running on Saucelabs?
  • What is the best way to integrate saucelabs with a nightwatch?
+5
source share
1 answer

Here is an example of my nightwatch.json file configured for parallel tests in Sauce Labs.

 { "src_folders" : ["tests"], "output_folder" : "reports", "custom_commands_path" : "custom_commands", "custom_assertions_path" : "", "page_objects_path" : "", "globals_path" : "", "selenium" : { "start_process" : false, "server_path" : "", "log_path" : "", "host" : "127.0.0.1", "port" : 4444, "cli_args" : { "webdriver.chrome.driver" : "", "webdriver.ie.driver" : "" } }, "test_workers" : {"enabled" : true, "workers" : "auto"}, "test_settings" : { "default" : { "launch_url" : "http://localhost", "selenium_port" : 80, "selenium_host" : "ondemand.saucelabs.com", "silent": true, "screenshots" : { "enabled" : false, "path" : "" }, "username" : "${SAUCE_USERNAME}", "access_key" : "${SAUCE_ACCESS_KEY}", "desiredCapabilities": { "javascriptEnabled": true, "acceptSslCerts": true } }, "chrome": { "desiredCapabilities": { "platform": "XP", "browserName": "chrome", "version": "41" } }, "firefox" : { "desiredCapabilities": { "platform": "XP", "browserName": "firefox", "version": "33" } }, "internet_explorer_10" : { "desiredCapabilities": { "platform": "Windows 7", "browserName": "internet explorer", "version": "10" } } } } 

Here is a link to the whole project if you want to take a look:

https://github.com/saucelabs-sample-test-frameworks/JS-Nightwatch.js

Regarding your second question. You can see the tests running on the Sauce Labs toolbar. Log in to www.saucelabs.com and click on the Tests tab in the upper left.

+2
source

Source: https://habr.com/ru/post/1245499/


All Articles