# protractor-error

> A protractor runner that allows you to run errors from previous runs.

Latest version **0.0.4** (published 2017-01-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install protractor-error
pnpm add protractor-error
yarn add protractor-error
bun add protractor-error
```

Provides the command `protractor-error`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-01-26 |
| First published | 2017-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.9.x |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Amanda daSilva |
| Maintainers | manda-linda |
| Keywords | jasmine, protractor, test, testing, angular, E2E |

## Links

- npm: https://www.npmjs.com/package/protractor-error
- Repository: https://github.com/manda-linda/protractor-error
- Homepage: https://github.com/manda-linda/protractor-error#readme
- Issues: https://github.com/manda-linda/protractor-error/issues
- npm.io page: https://npm.io/package/protractor-error

## Dependencies (5)

- [q](https://npm.io/package/q.md) ^1.4.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.17
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.6
- [protractor](https://npm.io/package/protractor.md) ^5.0.0
- [jasmine-reporters](https://npm.io/package/jasmine-reporters.md) ^2.2.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-01-26
- 0.0.3 — 2017-01-25
- 0.0.2 — 2017-01-25
- 0.0.1 — 2017-01-24

## README

# protractor-errors

A Jasmine wrapper for re-running failed Jasmine tests in Protractor.

# install

`npm install --save-dev protractor-errors` or `npm install -g protractor-errors` to add cli

# setup

Require the protractor-error module inside the Protractor config `onPrepare` function. This will execute the function
that adds a `JUnitXmlReporter` to the Jasmine environment. If the `params.errorsRun` flag is set, the module will execute only errored specs 
from the most recent run inside the directory `params.errorsPath`. The error output is written to the directory 
`params.errorsPath` + `params.currentTime`.


# configuration

The module is configured by passing the following args or setting them inside the Protractor config:

`params.errorsPath`: string, directory where the `JUnitXmlReporter` will write output and the module will look for previous run data. I 
recommend setting this in the Protractor configuration file since this should not change often.

`params.currentTime`: string, timestamp of the current test run. Triggering the test with the `protractor-error` cli runner will
set this value automatically.

`params.errorsRun`?: boolean, default `false`, should the module limit the current run to previous errors

`params.errorsTag`?: string, mark the current run/reference previously tagged run for errors


Example:

`protractor config.js --params.errorsPath 'jasmineReports' --params.currentTime '2017-01-24T23:53:06' --params.errorRun true`

or 

`protractor-errors config.js --params.errorsPath 'jasmineReports' --params.errorRun true`

# cli

To automate setting the `param.currentTime` argument, trigger your protractor tests using the cli.

To run, either install `protractor-errors` globally and call: `protractor-errors <config> [args]` from the command line, with
the same parameters you would call `protractor`. Or call the script by referencing the node_modules file directly: 
`./node_modules/protractor-errors/bin/protractor-errors.js <config> [args]`.

---
_Source: https://npm.io/package/protractor-error · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
