【发布时间】:2017-12-09 09:47:59
【问题描述】:
我正在尝试运行测试 (Chimp/),昨天有工作,今天没有工作。这是黑猩猩的配置:
module.exports = {
// - - - - CHIMP - - - -
watch: false,
watchWithPolling: false,
sync: true,
// - - - - WEBDRIVER-IO - - - -
webdriverio: {
coloredLogs: true,
logLevel: 'silent',
screenshotPath: './tests/logs/screenshots',
waitforTimeout: 20000,
waitforInterval: 250
},
// - - - - MOCHA - - - -
mocha: true,
mochaConfig: {
timeout: 20000,
},
chai: true,
// path: './tests/spec',
path: './tests/spec/shop/configurator/products',
format: 'dot',
// - - - - SELENIUM - - - -
browser: 'chrome',
platform: 'ANY',
name: '',
user: '',
key: '',
port: null,
host: null,
// - - - - METEOR - - - -
ddp: 'http://localhost:3000',
serverExecuteTimeout: 20000,
// - - - - PHANTOM - - - -
phantom_w: 1920,
phantom_h: 1280
};
这是报告输出,在第一次测试开始之前它就失败了。
[chimp] Running...
Configurator @watch
1) "before all" hook
0 passing (10s)
1 failing
1) Configurator @watch "before all" hook:
Uncaught unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
在浏览器堆栈中运行时,它可以工作。这是浏览器堆栈配置:
var browserstack = require('browserstack-local');
var bs_local = new browserstack.Local();
var bs_local_args = {/* ... */};
// starts the Local instance with the required arguments
bs_local.start(bs_local_args, function () {
console.log("Started BrowserStackLocal");
});
module.exports = {
// - - - - CHIMP - - - -
watch: false,
watchWithPolling: false,
sync: true,
// - - - - WEBDRIVER-IO - - - -
webdriverio: {
baseUrl: 'http://localhost:3000',
coloredLogs: true,
desiredCapabilities: {
os: 'OS X',
os_version: 'El Capitan',
browser: 'Chrome',
browser_version: '58.0',
resolution: '1280x1024',
project: 'project',
build: 'build',
'browserstack.local': true
},
logLevel: 'silent',
screenshotPath: './tests/logs/screenshots',
waitforTimeout: 50000,
waitforInterval: 250
},
// - - - - MOCHA - - - -
mocha: true,
mochaConfig: {
timeout: 60001,
},
chai: true,
path: './tests/spec',
format: 'dots',
// - - - - Screenshots - - - -
screenshotsOnError: true,
screenshotPath: './tests/logs/screenshots',
captureAllStepScreenshots: false,
saveScreenshotsToDisk: true,
saveScreenshotsToReport: false,
// - - - - SELENIUM - - - -
name: 'project',
browser: 'Chrome',
user: '...',
key: '...',
host: 'hub.browserstack.com',
port: 80,
// - - - - METEOR - - - -
ddp: 'http://localhost:3000',
serverExecuteTimeout: 30000,
// - - - - PHANTOM - - - -
phantom_w: 1280,
phantom_h: 1024
};
我试图修复它是更新 chimp (0.50.2),重新安装 node_modules,用 firefox 运行它,没有任何帮助。我在不同的环境(OS / Ubuntu 16.04)中尝试过,结果是一样的。
【问题讨论】:
标签: selenium testing webdriver mocha.js chimp.js