Tag Archives: npm

Configure Grunt-protractor-runner to run with a global install of protractor

Purpose

The reason to install protractor globally is that if you use the inline protractor provided with grunt-protractor-runner you have a 10 second penalty of waiting for the server to spawn a java process and then attach itself to it.

With the server already started and waiting for calls it is a lot faster turnaround for your tests to run.

Install protractor

Install protractor globally

If you have installed protractor globally to do your end to end testing via:

You may have to do this as sudo if you

npm -g install protractor

Download the chromedriver by updating webdriver-manager

webdriver-manager update

Continue reading

Advertisements

Phantomjs cannot be started and local install

Do not put phantomjs in your package.json of your node project.

When you call npm install it will install the package locally¬†in your project’s node_modules folder.

When you try and run grunt test you will get an error message similar to this.

phantomjs cannot be started.

Fixing local phantomjs install

rm node_modules

npm install

Phantomjs must be installed globally.

npm install -g phantomjs