MiyuHmt / E2E-Testing

Testing different E2E frameworks for AngularJS project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

E2E Testing

Protractor

Move to the Protractor project branch with:

git checkout protractor

Then install the required dependencies, you need a Selenium Server (make sure you have Java(JRE) installed) and Protractor:

npm install

Make a webdriver-manager update with: webdriver-manager update

Run the Protractor tests:

webdriver-manager start

This will start up a Selenium Server

Then, in a second terminal window run this command:

protractor tests/conf.js

Nightwatch

Move to the Nightwatch project branch with:

git checkout nightwatch

Then install the required dependencies, you need a Selenium Server (make sure you have Java(JRE) installed) and Nightwatch:

npm install -g nightwatch

This command will install nightwatch globally

npm install -g webdriver-manager

This command will install webdriver-manager globally

npm install

Make a webdriver-manager update with:

webdriver-manager update

Run the Protractor tests:

webdriver-manager start

This will start up a Selenium Server

In a second terminal window:

npm test

CasperJS

Move to the CasperJS project branch with:

git checkout CasperJS

Then install the required dependencies, you need PhantomJS and CasperJS:

npm install -g phantomjs

This command will install phantomjs globally

npm install -g casperjs

This command will install casperjs globally

npm install

In the test/testfile.js file, change the url with your index.html path

Run the CasperJS tests:

casperjs test test/testfile.js

Other useful commands

  • For the Selenium Server:

webdriver-manager clean

This command is for clear out the server and driver files. Use it if webdriver-manager start does not work.

webdriver-manager shutdown

Use it for stopping server

Documentation

PhantomJS API Documentation

CasperJS Documentation

Nightwatch API Documentation

Protractor API Documentation

About

Testing different E2E frameworks for AngularJS project.


Languages

Language:JavaScript 71.6%Language:HTML 28.4%