2016-06-03 2 views
1

내가 설치를 CentOS OS와 리눅스 상자에 nightwatch 자동화 된 UI 테스트를 실행하기 위해 노력하고있어. 시작하는 데 문제가 있습니다.리눅스 박스에서 nightwatch.js 테스트를 실행 하시겠습니까?

여기 nightwatch.json

"test_settings": { 
     "default": { 
      "launch_url": "", 
      "selenium_port": 4444, 
      "selenium_host": "localhost", 
      "silent": true, 
      "screenshots": { 
       "enabled": true, 
       "on_failure": true, 
       "on_error": true, 
       "path": "./screenshots" 
      }, 
      "detailed_option": true, 
      "end_session_on_fail": false, 
      "desiredCapabilities": { 
       "browserName": "chrome", 
       "javascriptEnabled": true, 
       "acceptSslCerts": true, 
       "chromeOptions": { 
        "args": [ 
         "use-fake-device-for-media-stream", 
         "use-fake-ui-for-media-stream" 
        ] 
       } 
      } 
     }, 

나는 리눅스 64 비트 크롬 드라이버를 설치 내 test_settings 구성입니다. 그런 다음 셀레늄 독립 실행 형 서버를 설치했습니다. 내가 노드 nightwatch를 사용하여 nightwatch 테스트를 할 때 나는 오류를 얻을

가 어떻게 UI 테스트를 자동화 nightwatch를 실행하는 리눅스 박스를 설정할 수 있습니다 "연결이! 셀레늄은 .. 시작되지 거부"?

는 나는 다음과 같은 오류가 false로 start_process을 설정하고 별도로 셀레늄 서버를 실행하면 :

는 설명 할 수있는, 특히 셀레늄 서버 설정을 많은 개체 실종처럼 nightwatch.json 보이는
14:23:41.158 WARN - Exception: unknown error: Chrome failed to start: exited abnormally 

답변

0

"Connection is refused! Selenium not started..". 예를 들어 여기 내, 그리고 이것의 대부분은 사용자 환경에 해당 될 것입니다 :

{ 
    "src_folders": ["./tests"], 
    "output_folder": "reports", 
    "custom_commands_path": [ 
    "./node_modules/testarmada-magellan-nightwatch/lib/commands", 
    "./lib/custom_commands" 
    ], 
    "custom_assertions_path": [ 
    "./node_modules/testarmada-magellan-nightwatch/lib/assertions" 
    ], 

    "page_objects_path": [ 
    "./lib/pages" 
    ], 

    "selenium": { 
    "start_process": true, 
    "server_path": "./node_modules/testarmada-magellan-nightwatch/node_modules/selenium-server/lib/runner/selenium-server-standalone-2.52.0.jar", 
    "log_path": "reports", 
    "host": "127.0.0.1", 
    "port": 4444, 
    "cli_args": { 
     "webdriver.chrome.driver": "./node_modules/testarmada-magellan-nightwatch/node_modules/chromedriver/lib/chromedriver/chromedriver", 
     "webdriver.ie.driver": "" 
    } 
    }, 

    "test_settings": { 
    "default": { 
     "launch_url": "http://127.0.0.1", 
     "selenium_port": 4444, 
     "selenium_host": "localhost", 
     "silent": true, 
     "sync_test_names": true, 
     "screenshots": { 
     "enabled": false, 
     "path": "" 
     }, 
     "desiredCapabilities": { 
     "browserName": "chrome" 
     }, 
     "globals": { 
     "waitForConditionTimeout": 60000 
     } 
    }, 

    "phantomjs": { 
     "desiredCapabilities": { 
     "browserName": "phantomjs", 
     "javascriptEnabled": true, 
     "acceptSslCerts": true, 
     "phantomjs.binary.path": "./node_modules/testarmada-magellan-nightwatch/node_modules/phantomjs/bin/phantomjs" 
     } 
    }, 

    "safari": { 
     "desiredCapabilities": { 
     "browserName": "safari" 
     } 
    }, 

    "firefox": { 
     "desiredCapabilities": { 
     "browserName": "firefox" 
     } 
    }, 

    "chrome": { 
     "desiredCapabilities": { 
     "browserName": "chrome" 
     } 
    }, 

    "sauce": { 
     "selenium_host": "ondemand.saucelabs.com", 
     "selenium_port": 80, 
     "username": "myUserName", 
     "access_key": "", 
     "desiredCapabilities": { 
     "browserName": "${SAUCE_BROWSER_NAME}", 
     "platform": "${SAUCE_BROWSER_PLATFORM}", 
     "version": "${SAUCE_BROWSER_VERSION}", 
     "tunnel-identifier": "${SAUCE_TUNNEL_ID}" 
     }, 
     "selenium": { 
     "start_process": false 
     } 
    } 
    } 
} 
관련 문제