2017-06-19 61 views
-1

我在OSX 10.11.6与Chrome版本59.0.3071.86(官方构建)(64位),我已经下载并安装了最新的流星todos应用程序,并且按照教程成功完成了单元和集成测试示例。当我尝试黑猩猩验收测试并在输出中使用--debug时,我得到下面的第一个日志,它表明浏览器不兼容。改变 node_modules /黑猩猩/距离/箱后/ default.js seleniumStandaloneOptions 像这样(通知版本:2.30)...我不能得到最新的流星todos例子黑猩猩验收测试工作在Mac OS X 10.11.16与铬版本59.0.3071.86

seleniumStandaloneOptions: { 
    // check for more recent versions of selenium here: 
    // http://selenium-release.storage.googleapis.com/index.html 
    version: '3.0.1', 
    baseURL: 'https://selenium-release.storage.googleapis.com', 
    drivers: { 
     chrome: { 
     // check for more recent versions of chrome driver here: 
     // http://chromedriver.storage.googleapis.com/index.html 
     //version: '2.25', 
     version: '2.30', 
     arch: process.arch, 
     baseURL: 'https://chromedriver.storage.googleapis.com' 
     }, 

..... 我得到下面的第二个日志。 我确实看到一个窗口瞬间闪烁,然后消失 - 太快,看不到它在做什么。在流星控制台上也没有输出。我尝试了许多不同的选择,但似乎无法完成这项工作,似乎也不知道如何进行调试。你们有没有其他想法或调试帮助?浏览器可以在localhost:3000上运行todos应用程序,但没有明显问题。浏览器在访问todos应用程序时没有控制台错误。 我真的很感谢任何人的洞察力。谢谢。

首次登录.....

$chimp --ddp=http://localhost:3000 --test --mocha --path=tests --debug 
[chimp] Chimp options are { watch: false, 
    watchTags: '@watch,@focus', 
    domainSteps: null, 
    e2eSteps: null, 
    fullDomain: false, 
    domainOnly: false, 
    e2eTags: '@e2e', 
    watchWithPolling: false, 
    server: false, 
    serverPort: 8060, 
    serverHost: 'localhost', 
    sync: true, 
    offline: false, 
    showXolvioMessages: true, 
    'fail-when-no-tests-run': false, 
    path: './features', 
    format: 'pretty', 
    tags: '[email protected]', 
    singleSnippetPerFile: true, 
    recommendedFilenameSeparator: '_', 
    chai: false, 
    screenshotsOnError: false, 
    screenshotsPath: '.screenshots', 
    captureAllStepScreenshots: false, 
    saveScreenshotsToDisk: true, 
    saveScreenshotsToReport: false, 
    jsonOutput: null, 
    compiler: 'js:/usr/local/lib/node_modules/chimp/dist/lib/babel-register.js', 
    conditionOutput: true, 
    browser: null, 
    platform: 'ANY', 
    name: '', 
    user: '', 
    key: '', 
    port: null, 
    host: null, 
    webdriverio: 
    { desiredCapabilities: {}, 
    logLevel: 'silent', 
    host: '127.0.0.1', 
    port: 4444, 
    path: '/wd/hub', 
    baseUrl: null, 
    coloredLogs: true, 
    screenshotPath: null, 
    waitforTimeout: 500, 
    waitforInterval: 250 }, 
    seleniumStandaloneOptions: 
    { version: '3.0.1', 
    baseURL: 'https://selenium-release.storage.googleapis.com', 
    drivers: { chrome: [Object], ie: [Object], firefox: [Object] } }, 
    noSessionReuse: false, 
    simianResultEndPoint: 'api.simian.io/v1.0/result', 
    simianAccessToken: false, 
    simianResultBranch: null, 
    simianRepositoryId: null, 
    mocha: false, 
    mochaCommandLineOptions: { bail: true }, 
    mochaConfig: 
    { tags: '', 
    grep: null, 
    timeout: 60000, 
    reporter: 'spec', 
    slow: 10000, 
    useColors: true }, 
    jasmine: false, 
    jasmineConfig: 
    { specDir: '.', 
    specFiles: [ '**/*@(_spec|-spec|Spec)[email protected](js|jsx)' ], 
    helpers: [ 'support/**/*[email protected](js|jsx)' ], 
    stopSpecOnExpectationFailure: false, 
    random: false }, 
    jasmineReporterConfig: {}, 
    ddp: false, 
    serverExecuteTimeout: 10000, 
    phantom_w: 1280, 
    phantom_h: 1024, 
    phantom_ignoreSSLErrors: false, 
    log: 'info', 
    debug: false, 
    seleniumDebug: null, 
    debugCucumber: null, 
    debugBrkCucumber: null, 
    debugMocha: null, 
    debugBrkMocha: null } 

Chimp version: 0.49.0 
ChromeDriver version: ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) 
Java version: java version "1.8.0_66", Java(TM) SE Runtime Environment (build 1.8.0_66-b17), Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) 
Selenium version: 3.0.1 
Selenium drivers version: chrome: 2.25, ie: 2.50.0, firefox: 0.11.1 
OS version: Darwin 15.6.0 
Node version: v6.11.0 
[chimp][browserdriver] starting process 
[chimp][browserdriver.stdout] Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 52347 
Only local connections are allowed. 

[chimp][browserdriver] started successfully 
[chimp][browserdriver] kill called on browserdriver process with pid 48946 
[chimp][browserdriver] checking if process exists 
[chimp][browserdriver] browserdriver process exists, killing it with SIGTERM 
[chimp][browserdriver] waiting for process to die (0/10) 
[chimp][browserdriver] process is dead 
Browser version: chrome undefined 

[chimp] Running... 
[chimp] interrupting 
[chimp] no processes to interrupt 
[chimp][chromedriver] starting process 
[chimp][chromedriver.stdout] Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 52347 
Only local connections are allowed. 

[chimp][chromedriver] started successfully 
[chimp][mocha] Running... 


[chimp][helper] Using the chai-expect assertion library 
[chimp][ddp] creating DDP wrapper 
[chimp][ddp] Connecting to DDP server { host: 'localhost', 
    port: '3000', 
    ssl: false, 
    path: undefined, 
    autoReconnect: true, 
    autoReconnectTimer: 500, 
    maintainCollections: true, 
    ddpVersion: '1', 
    useSockJs: true } 
[chimp][ddp] creating DDP wrapper 
[chimp][ddp] Connecting to DDP server { host: 'localhost', 
    port: '3000', 
    ssl: false, 
    path: undefined, 
    autoReconnect: true, 
    autoReconnectTimer: 500, 
    maintainCollections: true, 
    ddpVersion: '1', 
    useSockJs: true } 
[chimp][helper] getting browser 
[chimp][session-manager-factory] options are { host: 'localhost', 
    port: 52347, 
    user: undefined, 
    key: undefined, 
    browser: 'chrome', 
    deviceName: undefined } 
[chimp][session-manager] created a new SessionManager 
[chimp][helper] webdriverioOptions are {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","name":""},"logLevel":"verbose","host":"localhost","port":52347,"path":"/wd/hub","baseUrl":null,"coloredLogs":true,"screenshotPath":null,"waitforTimeout":500,"waitforInterval":250,"sync":true} 
[chimp][session-manager] creating webdriver remote 
[chimp][session-manager] checking connection to selenium server 
[15:10:45] COMMAND GET  "/wd/hub/status" 
[15:10:45] DATA  {} 
[15:10:45] RESULT  {"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.11.6"}} 
[chimp][session-manager] Connection to the to selenium server verified 
[chimp][session-manager] watch mode is false, not reusing a session 
[chimp][hooks] init browser 
[chimp][hooks] init browser callback 
[15:10:45] COMMAND POST  "/wd/hub/session" 
[15:10:45] DATA  {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"chrome","platform":"ANY","name":"","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}}} 
[chimp][helper] setupBrowserAndDDP had error 
{ Error: session not created exception: Chrome version must be >= 58.0.3029.0 
    at initBrowser (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:189:43) 
    at Object.setupBrowserAndDDP (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:264:7) 
    at Context.<anonymous> (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-helper.js:13:15) 
    at /usr/local/lib/node_modules/chimp/dist/lib/utils/fiberize.js:29:22 
    (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) 
    message: 'session not created exception: Chrome version must be >= 58.0.3029.0\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)', 
    type: 'RuntimeError', 
    seleniumStack: 
    { status: 33, 
    type: 'SessionNotCreatedException', 
    message: 'A new session could not be created.', 
    orgStatusMessage: 'session not created exception: Chrome version must be >= 58.0.3029.0\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)' } } 
Error: session not created exception: Chrome version must be >= 58.0.3029.0 
    at initBrowser (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:189:43) 
    at Object.setupBrowserAndDDP (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:264:7) 
    at Context.<anonymous> (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-helper.js:13:15) 
    at /usr/local/lib/node_modules/chimp/dist/lib/utils/fiberize.js:29:22 
    (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) 
[chimp][mocha] Closed with code 2 
[chimp][mocha] Mocha not in a stopping state 
[chimp] Finished running async processes with errors 
[chimp] run complete with errors Mocha failed 
[chimp] interrupting 
[chimp] 2 processes to interrupt 
[chimp][mocha] interrupting mocha 
[chimp][mocha] kill called on mocha process with pid 48957 
[chimp][mocha] checking if process exists 
[chimp][mocha] mocha process does not exists, ignoring 
[chimp][chromedriver] interrupt called 
[chimp][chromedriver] stopping process 
[chimp][chromedriver] kill called on chromedriver process with pid 48956 
[chimp][chromedriver] checking if process exists 
[chimp][chromedriver] chromedriver process exists, killing it with SIGTERM 
Mocha failed 
Error in chimp init Mocha failed 

....... 其次日志,chromedriver v 2.30 .....

$chimp --ddp=http://localhost:3000 --test --mocha --path=tests --debug 
[chimp] Chimp options are { watch: false, 
    watchTags: '@watch,@focus', 
    domainSteps: null, 
    e2eSteps: null, 
    fullDomain: false, 
    domainOnly: false, 
    e2eTags: '@e2e', 
    watchWithPolling: false, 
    server: false, 
    serverPort: 8060, 
    serverHost: 'localhost', 
    sync: true, 
    offline: false, 
    showXolvioMessages: true, 
    'fail-when-no-tests-run': false, 
    path: './features', 
    format: 'pretty', 
    tags: '[email protected]', 
    singleSnippetPerFile: true, 
    recommendedFilenameSeparator: '_', 
    chai: false, 
    screenshotsOnError: false, 
    screenshotsPath: '.screenshots', 
    captureAllStepScreenshots: false, 
    saveScreenshotsToDisk: true, 
    saveScreenshotsToReport: false, 
    jsonOutput: null, 
    compiler: 'js:/usr/local/lib/node_modules/chimp/dist/lib/babel-register.js', 
    conditionOutput: true, 
    browser: null, 
    platform: 'ANY', 
    name: '', 
    user: '', 
    key: '', 
    port: null, 
    host: null, 
    webdriverio: 
    { desiredCapabilities: {}, 
    logLevel: 'silent', 
    host: '127.0.0.1', 
    port: 4444, 
    path: '/wd/hub', 
    baseUrl: null, 
    coloredLogs: true, 
    screenshotPath: null, 
    waitforTimeout: 500, 
    waitforInterval: 250 }, 
    seleniumStandaloneOptions: 
    { version: '3.0.1', 
    baseURL: 'https://selenium-release.storage.googleapis.com', 
    drivers: { chrome: [Object], ie: [Object], firefox: [Object] } }, 
    noSessionReuse: false, 
    simianResultEndPoint: 'api.simian.io/v1.0/result', 
    simianAccessToken: false, 
    simianResultBranch: null, 
    simianRepositoryId: null, 
    mocha: false, 
    mochaCommandLineOptions: { bail: true }, 
    mochaConfig: 
    { tags: '', 
    grep: null, 
    timeout: 60000, 
    reporter: 'spec', 
    slow: 10000, 
    useColors: true }, 
    jasmine: false, 
    jasmineConfig: 
    { specDir: '.', 
    specFiles: [ '**/*@(_spec|-spec|Spec)[email protected](js|jsx)' ], 
    helpers: [ 'support/**/*[email protected](js|jsx)' ], 
    stopSpecOnExpectationFailure: false, 
    random: false }, 
    jasmineReporterConfig: {}, 
    ddp: false, 
    serverExecuteTimeout: 10000, 
    phantom_w: 1280, 
    phantom_h: 1024, 
    phantom_ignoreSSLErrors: false, 
    log: 'info', 
    debug: false, 
    seleniumDebug: null, 
    debugCucumber: null, 
    debugBrkCucumber: null, 
    debugMocha: null, 
    debugBrkMocha: null } 

Chimp version: 0.49.0 
ChromeDriver version: ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) 
Java version: java version "1.8.0_66", Java(TM) SE Runtime Environment (build 1.8.0_66-b17), Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) 
Selenium version: 3.0.1 
Selenium drivers version: chrome: 2.25, ie: 2.50.0, firefox: 0.11.1 
OS version: Darwin 15.6.0 
Node version: v6.11.0 
[chimp][browserdriver] starting process 
[chimp][browserdriver.stdout] Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 52418 
Only local connections are allowed. 

[chimp][browserdriver] started successfully 
[chimp][browserdriver] kill called on browserdriver process with pid 49380 
[chimp][browserdriver] checking if process exists 
[chimp][browserdriver] browserdriver process exists, killing it with SIGTERM 
[chimp][browserdriver] waiting for process to die (0/10) 
[chimp][browserdriver] process is dead 
Browser version: chrome undefined 

[chimp] Running... 
[chimp] interrupting 
[chimp] no processes to interrupt 
[chimp][chromedriver] starting process 
[chimp][chromedriver.stdout] Starting ChromeDriver 2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262) on port 52418 
Only local connections are allowed. 

[chimp][chromedriver] started successfully 
[chimp][mocha] Running... 


[chimp][helper] Using the chai-expect assertion library 
[chimp][ddp] creating DDP wrapper 
[chimp][ddp] Connecting to DDP server { host: 'localhost', 
    port: '3000', 
    ssl: false, 
    path: undefined, 
    autoReconnect: true, 
    autoReconnectTimer: 500, 
    maintainCollections: true, 
    ddpVersion: '1', 
    useSockJs: true } 
[chimp][ddp] creating DDP wrapper 
[chimp][ddp] Connecting to DDP server { host: 'localhost', 
    port: '3000', 
    ssl: false, 
    path: undefined, 
    autoReconnect: true, 
    autoReconnectTimer: 500, 
    maintainCollections: true, 
    ddpVersion: '1', 
    useSockJs: true } 
[chimp][helper] getting browser 
[chimp][session-manager-factory] options are { host: 'localhost', 
    port: 52418, 
    user: undefined, 
    key: undefined, 
    browser: 'chrome', 
    deviceName: undefined } 
[chimp][session-manager] created a new SessionManager 
[chimp][helper] webdriverioOptions are {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","name":""},"logLevel":"verbose","host":"localhost","port":52418,"path":"/wd/hub","baseUrl":null,"coloredLogs":true,"screenshotPath":null,"waitforTimeout":500,"waitforInterval":250,"sync":true} 
[chimp][session-manager] creating webdriver remote 
[chimp][session-manager] checking connection to selenium server 
[15:16:54] COMMAND GET  "/wd/hub/status" 
[15:16:54] DATA  {} 
[15:16:54] RESULT  {"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.11.6"}} 
[chimp][session-manager] Connection to the to selenium server verified 
[chimp][session-manager] watch mode is false, not reusing a session 
[chimp][hooks] init browser 
[chimp][hooks] init browser callback 
[15:16:54] COMMAND POST  "/wd/hub/session" 
[15:16:54] DATA  {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"chrome","platform":"ANY","name":"","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}}} 
[chimp][helper] setupBrowserAndDDP had error 
{ Error: session not created exception: Chrome version must be >= 58.0.3029.0 
    at initBrowser (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:189:43) 
    at Object.setupBrowserAndDDP (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:264:7) 
    at Context.<anonymous> (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-helper.js:13:15) 
    at /usr/local/lib/node_modules/chimp/dist/lib/utils/fiberize.js:29:22 
    (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) 
    message: 'session not created exception: Chrome version must be >= 58.0.3029.0\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)', 
    type: 'RuntimeError', 
    seleniumStack: 
    { status: 33, 
    type: 'SessionNotCreatedException', 
    message: 'A new session could not be created.', 
    orgStatusMessage: 'session not created exception: Chrome version must be >= 58.0.3029.0\n (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64)' } } 
Error: session not created exception: Chrome version must be >= 58.0.3029.0 
    at initBrowser (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:189:43) 
    at Object.setupBrowserAndDDP (/usr/local/lib/node_modules/chimp/dist/lib/chimp-helper.js:264:7) 
    at Context.<anonymous> (/usr/local/lib/node_modules/chimp/dist/lib/mocha/mocha-helper.js:13:15) 
    at /usr/local/lib/node_modules/chimp/dist/lib/utils/fiberize.js:29:22 
    (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) 
[chimp][mocha] Closed with code 2 
[chimp][mocha] Mocha not in a stopping state 
[chimp] Finished running async processes with errors 
[chimp] run complete with errors Mocha failed 
[chimp] interrupting 
[chimp] 2 processes to interrupt 
[chimp][mocha] interrupting mocha 
[chimp][mocha] kill called on mocha process with pid 49391 
[chimp][mocha] checking if process exists 
[chimp][mocha] mocha process does not exists, ignoring 
[chimp][chromedriver] interrupt called 
[chimp][chromedriver] stopping process 
[chimp][chromedriver] kill called on chromedriver process with pid 49390 
[chimp][chromedriver] checking if process exists 
[chimp][chromedriver] chromedriver process exists, killing it with SIGTERM 
Mocha failed 
Error in chimp init Mocha failed 

......

我真的很想让黑猩猩工作,以便对我们组中使用的重要流星项目进行验收测试。

如果有人知道更好的方法来做一个流星应用程序的自动接受测试,那么我将不胜感激这个洞察力。谢谢。

+0

我忘了提及我正在使用这些版本。 –

+0

$ node -v v6.11.0 $ npm -v 5.0.3 –

+0

嗨。没有足够的信息来帮助。你可以在gist.github.com上显示完整的日志吗? –

回答

0

我无法使Chrome正常工作,但是我可以在卸载并重新安装黑猩猩并在package.json的脚本块中使用--browser = safari后(或在cli上使用npm调用黑猩猩)来运行safari。 ) so ...

$chimp -v 
0.49.0 
$npm -v 
5.0.3 
$node -v 
v6.11.0 
$chimp --mocha --test --path=tests --debug --ddp=http://localhost:3000 --browser=safari 

有效。

+0

很高兴听到它。随时加入Xolv.io /社区,以获得其他黑猩猩用户的更多帮助 –

+0

谢谢,我会,现在我对黑猩猩印象深刻。 –