While running the testcases through jenkins on ec2 instance,I am getting error message.
Here's my nightwatch configuration:
{"src_folders" : ["test"],"globals_path": "globals.js","output_folder" : "reports","custom_commands_path" : "./commands","custom_assertions_path" : "./assertions","page_objects_path":"./pages","test_workers" : {"enabled" : false, "workers" : "auto" },"selenium" : {"start_process" : true,"server_path" : "./bin/selenium-server-standalone-4.0.0.jar","log_path" : "","port" : 4444,"cli_args" : {"webdriver.chrome.driver" : "./bin/chromedriver_linux" }},"test_settings" : {"default" : {"request_timeout_options": {"timeout": 100000 },"videos": {"enabled": false, "delete_on_pass": false, "path": "reports/videos","format": "mp4","resolution": "1280x720","fps": 15,"display": ":","pixel_format": "yuv420p","inputFormat": "mjpeg" },"launch_url" : "http://localhost","selenium_port" : 4444,"selenium_host" : "localhost","screenshots" : { "enabled" : false, "on_failure" : true, "on_error" : true, "path" : "./screenshots" },"end_session_on_fail" : true,"skip_testcases_on_fail" : false,"use_xpath" : true,"globals" : {"url" : "http://ec30-3-100-2-16.us-north-10.compute.amazonws.com:1000/login" }, "desiredCapabilities": {"browserName": "chrome","chromeOptions": {"w3c": false,"args" : ["headless","no-sandbox"] },"javascriptEnabled": true,"acceptSslCerts": true } }}
}
getting below error message in the console :
Login Test Test Suite==========================- Connecting to localhost on port 4444...Connected to localhost on port 4444 (31794ms). Using: chrome (81.0.4044.129) on Linux platform.Running: Verify user is able to login POST /wd/hub/session/2a3ca3b508f6dda4d0933225c41824a4/url - ECONNRESETError: socket hang up at connResetException (internal/errors.js:604:14) at Socket.socketCloseListener (_http_client.js:400:25) Error while running .navigateTo() protocol action: An unknown error has occurred. POST /wd/hub/session/2a3ca3b508f6dda4d0933225c41824a4/elements - ECONNRESETError: socket hang up at connResetException (internal/errors.js:604:14) at Socket.socketCloseListener (_http_client.js:400:25) Error while running .locateMultipleElements() protocol action: An unknown error has occurred.
I have installed the chrome browser(81.0.4044.129) in ec2 instance and their respective chrome linux driver
selenium server : selenium-server-standalone-4.0.0.jar
Note:I configured the Jenkins in my local machine(MAC OS) and its working fine.
Please let me know if you need more information.