2014-04-15 46 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“