Jenkins的量角器> lib / atoms / error.js:108> var template = new Error(this.message); ^ UnknownError:null

时间:2016-05-18 08:53:45

标签: jenkins gruntjs protractor

错误报告

我正在努力将Protractor脚本与Jenkins集成并尝试从中运行。

我正在使用grunt文件加载配置文件并打包json用于grunt和jenkins的插件。在Local中运行时,我的量角器测试工作正常。但是当提交Jenkins并尝试从中运行时,抛出错误

Output from running the test
grunt-contrib-copy@1.0.0 node_modules/grunt-contrib-copy
├── file-sync-cmp@0.1.1
└── chalk@1.1.3 (escape-string-regexp@1.0.5, supports-color@2.0.0, ansi-styles@2.2.1, has-ansi@2.0.0, strip-ansi@3.0.1)

grunt-cli@1.2.0 node_modules/grunt-cli
├── grunt-known-options@1.1.0
├── nopt@3.0.6 (abbrev@1.0.7)
├── findup-sync@0.3.0 (glob@5.0.15)
└── resolve@1.1.7

grunt@0.4.5 node_modules/grunt
├── which@1.0.9
├── dateformat@1.0.2-1.2.3
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── grunt-legacy-util@0.2.0
├── hooker@0.2.3
├── nopt@1.0.10 (abbrev@1.0.7)
├── exit@0.1.2
├── minimatch@0.2.14 (sigmund@1.0.1, lru-cache@2.7.3)
├── glob@3.1.21 (inherits@1.0.2, graceful-fs@1.2.3)
├── lodash@0.9.2
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.2)
├── grunt-legacy-log@0.1.3 (grunt-legacy-log-utils@0.1.1, underscore.string@2.3.3, lodash@2.4.2)
└── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)

phantomjs@1.9.20 node_modules/phantomjs
├── progress@1.1.8
├── request-progress@2.0.1 (throttleit@1.0.0)
├── kew@0.7.0
├── hasha@2.2.0 (is-stream@1.1.0, pinkie-promise@2.0.1)
├── which@1.2.8 (isexe@1.1.2, is-absolute@0.1.7)
├── extract-zip@1.5.0 (debug@0.7.4, yauzl@2.4.1, mkdirp@0.5.0, concat-stream@1.5.0)
├── fs-extra@0.26.7 (path-is-absolute@1.0.0, klaw@1.2.0, jsonfile@2.3.1, graceful-fs@4.1.4, rimraf@2.5.2)
└── request@2.67.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, oauth-sign@0.8.2, forever-agent@0.6.1, tunnel-agent@0.4.3, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, combined-stream@1.0.5, node-uuid@1.4.7, qs@5.2.0, mime-types@2.1.11, tough-cookie@2.2.2, form-data@1.0.0-rc4, bl@1.0.3, har-validator@2.0.6, http-signature@1.1.1, hawk@3.1.3)

grunt-contrib-jshint@1.0.0 node_modules/grunt-contrib-jshint
├── hooker@0.2.3
├── chalk@1.1.3 (escape-string-regexp@1.0.5, supports-color@2.0.0, ansi-styles@2.2.1, strip-ansi@3.0.1, has-ansi@2.0.0)
└── jshint@2.9.2 (strip-json-comments@1.0.4, console-browserify@1.1.0, exit@0.1.2, minimatch@2.0.10, shelljs@0.3.0, cli@0.6.6, htmlparser2@3.8.3, lodash@3.7.0)

grunt-ptor@1.0.10 node_modules/grunt-ptor
├── lodash.merge@4.4.0 (lodash._root@3.0.1, lodash.isplainobject@4.0.4, lodash.rest@4.0.3, lodash.keysin@4.1.4, lodash._baseclone@4.5.7)
├── yargs@4.7.1 (decamelize@1.2.0, camelcase@3.0.0, set-blocking@1.0.0, y18n@3.2.1, window-size@0.2.0, require-main-filename@1.0.1, lodash.assign@4.0.9, yargs-parser@2.4.0, string-width@1.0.1, os-locale@1.4.0, cliui@3.2.0, pkg-conf@1.1.2, read-pkg-up@1.0.1)
└── protractor@3.3.0 (jasminewd2@0.0.9, chalk@1.1.3, q@1.4.1, adm-zip@0.4.7, glob@6.0.4, optimist@0.6.1, saucelabs@1.0.1, jasmine@2.4.1, source-map-support@0.4.0, request@2.67.0, selenium-webdriver@2.52.0)

grunt-selenium-webdriver@0.2.482 node_modules/grunt-selenium-webdriver

grunt-protractor-runner@2.1.2 node_modules/grunt-protractor-runner
├── split@0.3.3 (through@2.3.8)
├── through2@0.5.1 (xtend@3.0.0, readable-stream@1.0.34)
└── protractor@2.5.1 (jasminewd@1.1.0, jasminewd2@0.0.6, html-entities@1.1.3, q@1.0.0, minijasminenode@1.1.1, optimist@0.6.1, adm-zip@0.4.4, glob@3.2.11, jasmine@2.3.2, saucelabs@1.0.1, source-map-support@0.2.10, accessibility-developer-tools@2.6.0, lodash@2.4.2, request@2.57.0, selenium-webdriver@2.47.0)

npm update
grunt test �[4mRunning "protractor:e2e" (protractor) task�[24m Starting selenium standalone server... [launcher] Running 1 instances of WebDriver **Selenium standalone server started at http://10.87.23.55:40872/wd/hub /home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108 var template = new Error(this.message); ^ UnknownError: null at new bot.Error (/home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-**runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18) at Object.bot.response.checkResponse (/home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9) at /home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24 at [object Object].promise.ControlFlow.runInFrame_ (/home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20) at [object Object].goog.defineClass.notify (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25) at [object Object].promise.Promise.notify_ (/home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12) at Array.forEach (native) at [object Object].promise.Promise.notifyAll_ (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15) at goog.async.run.processWorkQueue (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15) at runMicrotasksCallback (node.js:337:7) From: Task: WebDriver.createSession() at Function.webdriver.WebDriver.acquireSession_ (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22) at Function.webdriver.WebDriver.createSession (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30) at [object Object].Builder.build (/home/jenkins/jobs/xxxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22) at [object Object].DriverProvider.getNewDriver (/home/jenkins/jobs/xxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7) at [object Object].Runner.createBrowser (/home/jenkins/jobs/xxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/lib/runner.js:182:37) at /home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/lib/runner.js:263:21 at _fulfilled (/home/jenkins/jobs/xxxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:797:54) at self.promiseDispatch.done (/home/jenkins/jobs/xxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:826:30) at Promise.promise.promiseDispatch (/home/jenkins/jobs/xxxxs/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:759:13) at **/home/jenkins/jobs/xxx/workspace/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:573:44 [launcher] Process exited with error code 1 �[31m>> �[39m �[33mWarning: Tests failed, protractor exited with code: 1� Use --force to continue.�[39m
�[31mAborted due to warnings.�[39m
Build step 'Execute shell' marked build as failure``
Sending e-mails to: ``
Finished: FAILURE**

重现错误的步骤 将文件提交给Jenkins

您正在运行测试的URL(如果相关)

功能请求

采用新功能的原因 这是一个突破性的变化吗? (这将如何影响现有功能)

0 个答案:

没有答案