简体   繁体   English

Chrome驱动程序在执行时间歇性挂起

[英]Chrome Driver Hangs intermittently while execution

I'm using protractor to automate my application, i have around 400 test cases to be automated, i use jenkins for Continous Integration. 我正在使用量角器自动化我的应用程序,我有大约400个测试用例要自动化,我使用jenkins进行连续集成。

Every day i trigger execution through Jenkins as part of nightly executions, but after some time Chrome Driver Hangs, i cant see the browser. 我每天都会通过Jenkins触发执行,作为夜间执行的一部分,但Chrome驱动程序挂起一段时间后,我无法看到浏览器。 But in console log in Jenkins i can see 但在詹金斯的控制台登录中,我可以看到

"[launcher] 1 instance(s) of WebDriver still running" , i cant see browser and my execution can't proceed further and i had to forcefully stop the Build. “[启动器] WebDriver的1个实例仍在运行” ,我无法看到浏览器,我的执行无法继续进行,我不得不强行停止Build。

I'm using 我正在使用

Windows 7 Protractor 2.5.1 Windows 7量角器2.5.1

my sample conf.js file 我的示例conf.js文件

framework: 'jasmine',
jasmineNodeOpts: {
    onComplete: null,

    defaultTimeoutInterval: 120000,
},
'autoStartStopServer': true,
capabilities: {
    'browserName': 'chrome',
    shardTestFiles: true,
    maxInstances: 1
},
suites: {
    specs: '../specs/module1/*.js',

},

I found similar issue with a proposed solution here and here it says to add DBUS_SESSION_BUS_ADDRESS=/dev/null but how to use the same in Windows, any help is appreciated. 我在这里找到了与提议的解决方案类似的问题, 这里它说要添加DBUS_SESSION_BUS_ADDRESS=/dev/null但是如何在Windows中使用它,任何帮助都表示赞赏。

In command promt (not git bash or cywin) try this command: 在命令promt(不是git bash或cywin)中尝试此命令:

SET DBUS_SESSION_BUS_ADDRESS=/dev/null SET DBUS_SESSION_BUS_ADDRESS = / dev / null

To set Environment Variables then run node app, try this command: 要设置环境变量,然后运行节点应用程序,请尝试以下命令:

SET DBUS_SESSION_BUS_ADDRESS=/dev/null&& node app.js SET DBUS_SESSION_BUS_ADDRESS = / dev / null && node app.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM