2016-08-16 88 views
0

我下面下面的例子来看看验收测试是如何在流星实施流星验收与黑猩猩测试总是给人错误

http://www.mhurwi.com/tutorial-test-driven-development-with-meteor-cucumber-chimp/

以下是我已经尝试

  1. 安装步骤全局黑猩猩即npm install -g chimp
  2. 从上面的链接下载git示例
  3. 运行流星应用程序端口3000
  4. 打开一个单独的终端,然后执行以下命令

    黑猩猩--ddp = http://localhost:3000 --watch --path =测试

我得到以下错误所有的时间甚至虽然我能够不带服务器或客户端运行错误流星应用

[chimp] Running... 
=> Your Meteor application has errors. 

节点版本:4.2.3

应用流星版本:1.2.1

基地流星版本:1.4.0.1

不明白什么是我做错了...任何帮助表示赞赏。

完整的错误日志下面

[chimp] Chimp options are { watch: false, 
    watchTags: '@focus,@dev,@watch', 
    watchWithPolling: false, 
    criticalSteps: null, 
    criticalTag: '@critical', 
    server: false, 
    serverPort: 8060, 
    serverHost: 'localhost', 
    sync: true, 
    offline: 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:E:\\Nodist\\bin\\node_modules\\chimp\\dist\\lib\\babel-register.js', 
    conditionOutput: true, 
    browser: 'chrome', 
    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: '2.53.1', 
    baseURL: 'https://selenium-release.storage.googleapis.com', 
    drivers: { chrome: [Object], ie: [Object] } }, 
    noSessionReuse: false, 
    simianResultEndPoint: 'api.simian.io/v1.0/result', 
    simianAccessToken: false, 
    simianResultBranch: null, 
    simianRepositoryId: null, 
    mocha: false, 
    mochaTags: '', 
    mochaGrep: null, 
    mochaTimeout: 60000, 
    mochaReporter: 'spec', 
    mochaSlow: 10000, 
    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, 
    phantom_w: 1280, 
    phantom_h: 1024, 
    log: 'info', 
    debug: false, 
    seleniumDebug: null, 
    debugCucumber: null, 
    debugBrkCucumber: null, 
    debugMocha: null, 
    debugBrkMocha: null } 
[chimp] Watching features with tagged with @focus,@dev,@watch 
[chimp] watcher ready, running for the first time 
[chimp] rerunning 

[chimp] Running... 
[chimp] interrupting 
[chimp] no processes to interrupt 
[chimp][selenium] Selenium object created 
[chimp][selenium] Start 
[chimp][selenium] Installing Selenium + drivers if needed 
=> Your Meteor application has errors. 

[chimp][selenium] hub can be seen at http://localhost:57897/wd/hub 
[chimp][ddp-watcher] DDP connection error! Network error: ws://localhost:3000/websocket: connect ECONNREFUSED 127.0.0.1:3000 
Unhandled rejection Error: Network error: ws://localhost:3000/websocket: connect ECONNREFUSED 127.0.0.1:3000 
    at Object.ensureErrorObject (E:\Nodist\bin\node_modules\chimp\node_modules\bluebird\js\main\util.js:261:20) 
    at Promise._rejectCallback (E:\Nodist\bin\node_modules\chimp\node_modules\bluebird\js\main\promise.js:469:22) 
    at E:\Nodist\bin\node_modules\chimp\node_modules\bluebird\js\main\promise.js:486:17 
    at onFailed (E:\Nodist\bin\node_modules\chimp\node_modules\xolvio-ddp\lib\ddp-client.js:338:7) 
    at g (events.js:260:16) 
    at emitOne (events.js:77:13) 
    at emit (events.js:169:7) 
    at null.<anonymous> (E:\Nodist\bin\node_modules\chimp\node_modules\xolvio-ddp\lib\ddp-client.js:84:12) 
    at emitOne (events.js:82:20) 
    at emit (events.js:169:7) 
    at EventTarget.dispatchEvent (E:\Nodist\bin\node_modules\chimp\node_modules\faye-websocket\lib\faye\websocket\api\event_target.js:24:10) 
    at instance._emitError (E:\Nodist\bin\node_modules\chimp\node_modules\faye-websocket\lib\faye\websocket\api.js:142:10) 
    at Socket.<anonymous> (E:\Nodist\bin\node_modules\chimp\node_modules\faye-websocket\lib\faye\websocket\api.js:111:12) 
    at emitOne (events.js:82:20) 
    at Socket.emit (events.js:169:7) 
    at emitErrorNT (net.js:1253:8) 

更新日志

[chimp] Running... 
[chimp] interrupting 
[chimp] no processes to interrupt 
[chimp][selenium] Selenium object created 
[chimp][selenium] Start 
[chimp][selenium] Installing Selenium + drivers if needed 
=> Your Meteor application has errors. 
[chimp][ddp-watcher] Connected 
[chimp][ddp-watcher] ADDED to meteor_autoupdate_clientVersions: e4NrqzoRgyNdxad2f 
[chimp][ddp-watcher] ADDED to meteor_autoupdate_clientVersions: version 
[chimp][ddp-watcher] ADDED to meteor_autoupdate_clientVersions: version-cordova 
[chimp][ddp-watcher] ADDED to meteor_autoupdate_clientVersions: version-refreshable 
[chimp][ddp-watcher] meteor_autoupdate_clientVersions ready: 
[chimp][ddp-watcher] [object Object] 

[chimp][selenium] hub can be seen at http://localhost:62772/wd/hub 
[chimp] Finished running async processes with errors 
[chimp] run complete with errors [Error: Unable to connect to selenium] 
[chimp] finished rerun 
+0

需要多一点的信息。你能发布完整的错误日志吗?尝试使用--debug运行,看看你得到了什么输出 –

+0

完全错误日志添加 – Adi

+0

你能够从浏览器浏览到localhost:3000吗? –

回答

0

这似乎是一个代理问题。我的公司组策略似乎强制执行了一个不同的代理设置,它可以完美替代我的系统代理旁路设置。

一旦我连接我的笔记本电脑到来宾WiFi,它不使用任何代理设置,硒服务器突然可及,然后黑猩猩成功地运行我的测试。

0

Chimp.js最新版本需要Oracle的JDK 1.8或更高版本。你可以download Oracle's latest JDK here。通过运行java -version来确认您的版本。

+0

这是我的机器的版本 Java版本“1.8。0_102“ Java™SE运行时环境(内部版本1.8.0_102-b14) Java HotSpot™64位服务器虚拟机(版本25.102-b14,混合模式)这是正确的版本@hwillson? – Adi

+0

该版本看起来不错,我也有类似的问题,升级JDK解决了我的问题,正如您在原帖中的评论中所述,显示运行'chimp --ddp = http:// localhost:3000 - watch --path = tests --debug'将有助于调试。 – hwillson

+0

完全错误日志添加 – Adi

相关问题