Coder Social home page Coder Social logo

protractor-demo's Introduction

protractor-demo

Proof of concept for e2e testing angular using

  • protractor
  • karma
  • jasmine
  • grunt

Requirements

1. Runtimes

  • NodeJS: http://www.nodejs.org (The version on Chocolatey was too old at this time)
  • JRE8 (using Chocolatey): choco install jre8 -y
  • Python2 (using Chocolatey): cchoco install python2 -y

If you have Python3 already installed, ensure Python2 is the one being loaded by moving the Python2 directory above the Python3 directory in the PATH variable string. Ensure it's Python2 by entering python in the console and note the version number.

1.1 Ensure runtimes are available on PATH/command line

  • Ensure typing node, npm, java, and python does not produce an error in the console.

2. Global node packages

npm install -g grunt-cli
npm install -g protractor
npm install -g bower
npm install -g http-server

2.1 Ensure global node packages are available on PATH/command line

  • Ensure typing grunt, protractor, bower, and http-server does not produce an error in the console.

2. Selenium drivers

The Selenium drivers must be available on PATH. This project uses the IE driver.

  • Copy\thirdparty\selenium-ie-driver\x86\IEDriverServer.exe and put it in %userprofile%\AppData\Roaming\npm since this directory is already on PATH.
    • TODO: Look for npm package for this or create one.

3. Install packages

npm install
bower install

4. Run Grunt tasks

grunt         runs unit tests with karma and e2e tests with protractor (default)
grunt unit    runs unit tests with karma
grun e2e      runs e2e tests with protractor

5. Browse site

  • In a separate terminal type http-server in the root folder (where all the config files are).
  • Open a browser and browse to http://localhost:8080/app/src/index.html

Note

  • IEDriverServer.exe under thirdparty/selenium-ie-driver/x86/ needs to be on PATH.
    • TODO: Look for npm package for this or make a workaround that puts this on PATH on install.

protractor-demo's People

Watchers

Eirik Årdal avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.