2014-04-15 157 views
1

我想在RHEL 6.5盒子上使用grunt來運行量角器。我確認它有Firefox來運行測試。AngularJS量角器測試無法啓動

Selenium服務器使用「webdriver-manager update」進行安裝。 其他安裝信息:

Node v0.11.12 
grunt-cli v0.1.13 
grunt v0.4.4 
protractor 0.21.0 
grunt-protractor-runner 0.2.4 

我量角器配置文件:

exports.config = { 

    seleniumAddress: 'http://localhost:4444/wd/hub', 

    capabilities: { 
    'browserName': 'firefox' 
    }, 

    specs: ['/test/example-spec.js'], 

    jasmineNodeOpts: { 
    showColors: true, 
    defaultTimeoutInterval: 20000 
    }, 

    allScriptsTimeout: 20000 

}; 

運行從詹金斯的腳本或使用手動咕嚕失敗,錯誤:

Running "protractor:e2e" (protractor) task 
util.puts: Use console.log instead 
Using the selenium server at http://localhost:4444/wd/hub 
>> 
Fatal error: protractor exited with code: null 

我可以看到「webdriver-管理員啓動「能夠啓動端口4444上的硒服務器。 我無法找到任何日誌。我在這裏錯過了什麼嗎?

編輯:在grunt中沒有錯誤,使用--verbose選擇了grunt。看起來量角器插件在某處失敗。我會深入挖掘它。

+0

有關這方面的任何消息,你有沒有設法修復? – Acosta

+0

還沒有成功:( – Nilesh

回答

1

我發現與Firefox,基本上我量角器配置中沒有使用任何webdriver的服務器設置的問題,但用的是默認的服務器,這種方式是很方便,因爲沒得由我自己開始硒

爲了由我自己解決這個問題,我開始硒服務器spesifiying Firefox和Chrome司機

Java的罐子「C:\用戶\%USERNAME%\應用程序數據\漫遊\故宮\ node_modules \量角器\硒\硒的服務器standalone- 2.42.1.jar「-Dwebdriver.chrome.driver =」C:\ Users \%USERNAME%\ AppData \ Roaming \ npm \ node_modules \ protractor \ selenium \ chromedriver.exe「-Dwebdriver.firefox.bin =」C:\用戶\%USERNAME%\ AppData \ Local \ Mozilla Firefox \ fi refox.exe「