我在运行protractor-perf代码时遇到错误

时间:2016-05-02 11:53:12

标签: performance protractor

我正在尝试运行以下从GitHub复制的代码:

var PerfRunner = require('C:/Users/User12/AppData/Roaming/npm/node_modules/protractor-perf');
describe('angularjs homepage todo list', function() {
  var perfRunner = new PerfRunner(protractor, browser);

  it('should add a todo', function() {
    browser.get('http://www.angularjs.org');
    perfRunner.start();

    element(by.model('todoList.todoText')).sendKeys('write a protractor test');
    element(by.css('[value="add"]')).click();

    perfRunner.stop();

    if (perfRunner.isEnabled) {
        expect(perfRunner.getStats('meanFrameTime')).toBeLessThan(60);
    };

    var todoList = element.all(by.repeater('todo in todoList.todos'));
    expect(todoList.count()).toEqual(3);
    expect(todoList.get(2).getText()).toEqual('write a protractor test');

  });
});

但是,只要perfRunner.start()行执行,我就会收到一些我无法理解的错误。 错误:

Failures:
1) angularjs homepage todo list should add a todo
  Message:
Failed: [logTypes()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:16:47'
System info: host: 'User12', ip: '10.XX.XX.37', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: unknown
  Stack:
Error: [logTypes()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:16:47'
System info: host: 'User12', ip: '10.XX.XX.37', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: unknown
    at exports.newError (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\lib\utils.js:139:13)
    at C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\lib\callbacks.js:75:19
    at C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\lib\webdriver.js:174:5
    at Request._callback (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\lib\http-utils.js:87:7)
    at Request.self.callback (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\node_modules\request\request.js:368:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\browser-perf\node_modules\wd\node_modules\request\request.js:1219:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
From: Task: <anonymous>
    at [object Object].start (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\lib\index.js:51:37)
    at Object.<anonymous> (e:\Praveen Data\Projects\ECP\CentralRegistryUI\TestScripts\Validations\Test1.js:114:20)
    at C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasminewd2\index.js:96:23
    at new wrappedCtr (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:2468:26)
    at controlFlowExecute (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasminewd2\index.js:82:18)
    at goog.async.run.processWorkQueue (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\async\run.js:124:15)
    at process._tickCallback (node.js:368:9)
From: Task: Run it("should add a todo") in control flow
    at Object.<anonymous> (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasminewd2\index.js:81:14)
    at attemptAsync (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1819:24)
    at QueueRunner.run (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1774:9)
    at QueueRunner.execute (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1762:10)
    at Spec.Env.queueRunnerFactory (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:627:35)
    at Spec.execute (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:353:10)
    at Object.fn (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:2360:37)
    at attemptAsync (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1819:24)
    at QueueRunner.run (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1774:9)
    at QueueRunner.execute (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1762:10)
From asynchronous test:
Error
    at Suite.<anonymous> (e:\Praveen Data\Projects\ECP\CentralRegistryUI\TestScripts\Validations\Test1.js:112:5)
    at addSpecsToSuite (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:743:25)
    at Env.describe (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:713:7)
    at jasmineInterface.describe (C:\Users\User12\AppData\Roaming\npm\node_modules\protractor-perf\node_modules\protractor\node_modules\jasmine\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:3219:18)
    at Object.<anonymous> (e:\Data\Projects\UI\TestScripts\Validations\Test1.js:109:1)

1 spec, 1 failure
Finished in 4.495 seconds
Shutting down selenium standalone server.
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 failed 1 test(s)
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1

我们是否需要特定版本的量角器和其他模块才能运行perfRunner? 请帮忙。

0 个答案:

没有答案