1.3.0 • Published 9 years ago

protractor-e2e-coverage v1.3.0

Weekly downloads
59
License
ISC
Repository
github
Last release
9 years ago

Protractor e2e coverage

A plugin for Protractor to measure e2e coverage

Install

npm install protractor-e2e-coverage

Usage

in your protractor conf file add this:

  plugins: [
    {
      path: '../node_modules/protractor-e2e-coverage/index.js',
      outdir: 'test/coverage'
    }
  ],

Options

coverage setup comes predefined with what elements and events to listen to and report. it's possible to set this up with the following command

  plugins: [
	{
      elements: [ 
      	// add one for each DOM type
        {
          'type': 'button',
          'events': ['click'], // array of events to listen to
          'elements': []
        }
      ]
  }

Current DOM element and event setup

ElementsEvents
Button-Click-----
Form------Submit
InputInputClickInvalidFocusBlurChange-
Select-Click---Change-
TextareaInputClick-FocusBlurChange-
A-Click-FocusBlur--

What it is

Runs after your tests to see which elements on the page has been interacted with. If coverage in unit is measuring visited logic, then this can be seen as visited elements.

What the user sees, the user should be able to interact with

It essentially detects events on certain elements