我有一个量角器项目,它按照我的预期启动并运行规范,但是差不多2分钟后,它开始在其余的测试用例中出现此错误。我不知道为什么。它在一周前运行完美,但现在我遇到了这个错误,并没有给出(或者我看不到)有关错误的任何细节。
for(int i = 0; i <= Tail_amount; i++)
有关项目的信息:它运行两个浏览器并使用chromedriver_2.31.exe。
protractor.conf.js =&GT;
"Error: Failed: WebDriverError
at stack (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:2200:17)
at buildExpectationResult (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:2170:14)
at Spec.expectationResultFactory (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:777:18)
at Spec.addExpectationResult (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:450:34)
at Env.fail (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:1192:25)
at Function.next.fail (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasmine-core\\lib\\jasmine-core\\jasmine.js:4046:19)
at Z:\\dev\\lmw\node_modules\\protractor\node_modules\\jasminewd2\\index.js:64:48
at ControlFlow.emit (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\events.js:62:21)
at ControlFlow.shutdown_ (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\promise.js:2565:10)
at shutdownTask_.MicroTask (Z:\\dev\\lmw\node_modules\\protractor\node_modules\\selenium-webdriver\\lib\\promise.js:2490:53)"
package.json =&gt;
directConnect: false,
splitTestsBetweenCapabilties: true,
multiCapabilities:[
{
shardTestFiles: false,
maxInstances: 1,
maxSessions: 1,
sequential: true,
parallelCapability: true,
browserName: 'chrome',
specs: [
'./tests/login/*.js',
'./tests/header/*.js',
'./tests/my-profile/*.js',
'./tests/nominee/*.js',
'./tests/left-menu/*.js',
'./tests/contact-us/*.js',
'./tests/relations/*.js',
'./tests/coordinator/*.js',
'./tests/sitemap/*.js',
'./tests/landing/*.js',
'./tests/vouchers/*.js',
'./tests/extend/*.js',
'./tests/activity/*.js'
]
},
{
shardTestFiles: false,
maxInstances: 1,
maxSessions: 1,
sequential: true,
parallelCapability: true,
browserName: 'chrome',
specs: [
'./tests/enrollment/*.js',
'./tests/claim-/*.js',
'./tests/transfer/*.js',
'./tests/donate/*.js',
'./tests/buy/*.js',
'./tests/calculator/*.js'
]
}
]
答案 0 :(得分:0)
如果您使用的是办公室笔记本电脑,可以检查系统中是否有任何加密。这些加密中很少有人破坏节点模块,导致测试用例失败。
这是我可以猜到的唯一原因,因为您之前运行了所有测试用例
PS:我遇到了同样的问题