Vaish
Vaish

Reputation: 37

Protractor-perf test script shows error at 'require('..') line

I'm new to protractor-perf. I have installed it and tried to execute a simple script that I had executed using protractor earlier. The following are the errors I'm facing:

  1. If I use the line var PerfRunner = require('..'); and initialize it as var perfRunner = new PerfRunner(protractor,browser);- I'm getting the error "Cannot find module '..' "

  2. If I use var PerfRunner = require('protractor-perf'); and initialize it as var perfRunner = new PerfRunner(protractor); as per this link http://blog.nparashuram.com/2014/11/protractor-perf-performance-regression.html - I'm getting the error "Cannot read property 'params' of undefined"

  3. If I use var PerfRunner = require('protractor-perf'); and initialize it as var perfRunner = new PerfRunner(protractor, browser); - the test starts executing but the browser just hangs. There is no progress and it doesn't halt as well.

I'm using Chrome version 44.0, protractor-perf version 0.1.11 and protractor version 1.4.0

I do not know if I've made some mistake during installation or I'm making one in the script.

Upvotes: 0

Views: 410

Answers (2)

shruti dalvi
shruti dalvi

Reputation: 281

Protractor-perf works fine with chrome as well. This issue is might be because of incorrect location of protractor-perf folder.

try giving absolute path

var PerfRunner = require('C:/Users/shrutid/AppData/Roaming/npm/node_modules/protractor-perf');
var perfRunner = new PerfRunner(protractor, browser);

Upvotes: 1

Kirill
Kirill

Reputation: 21

I found that chromedriver does not work properly with new versions of Chrome (I don't know why). You can use firefox instead of Chrome to launch your tests. It's works for me.

Upvotes: 0

Related Questions