0.1.33 • Published 4 years ago

@testim/root-cause-mocha v0.1.33

Weekly downloads
240
License
AGPL-3.0-only
Repository
github
Last release
4 years ago

Testim Root Cause mocha integration

Testim Root Cause is root cause analysis tools for puppeteer and playwright tests.
To learn more about Root Cause is, and for configuration options, visit the docs website https://screenplay.testim.io/

Prerequisites

Supported mocha versions are: 8.x and 7.2. while older versions will probably work, they are being tested.
We assume you already have tests written with puppeteer/playwright and the browser tab you are using is exposed globally as global.page.

Integration

Install the package:

# Using yarn
yarn add @testim/root-cause-mocha -D
# Using npm
npm install @testim/root-cause-mocha -D

Mocha 8

You need to load our Root Hook, and to use our reporter. Our reporter wraps the default reporter.
Minimal Example:

mocha --require @testim/root-cause/rootHooks --reporter @testim/root-cause/reporter

Configuring the reporter

By default, the reporter will be spec reporter.
You may use --reporter-options actualReporter=REPORTERNAMEORPATH to use different reporter, as you would with --reporter.
Example:

mocha --require @testim/root-cause/rootHooks --reporter @testim/root-cause/reporter --reporter-options actualReporter=json

Mocha 7

For mocha 7, we will use the --file option instead of Root Hook. Minimal Example:

mocha --file @testim/root-cause/pre-mocha8 --reporter @testim/root-cause/reporter

Configuring the reporter

Same as Mocha 8

Using mocha config file

You may apply all these cli flags using mocha config file.

Minimal example:

// .mocharc.json
{
    "require": "@testim/root-cause/rootHooks",
    "reporter": "@testim/root-cause/reporter",
    "reporter-option": {
        "actualReporter": "NYAN",
    }
}

If you've encountered any problem, please open an issue in:

https://github.com/testimio/screenplay-issues

0.1.33

4 years ago

0.1.32

4 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.18

5 years ago

0.1.19

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.0.8-canary-9.0

5 years ago

0.0.8-canary-7.0

5 years ago

0.0.12

5 years ago

0.0.13

5 years ago

0.1.0

5 years ago

0.0.7-canary-4.0

5 years ago

0.1.1

5 years ago

0.0.7-canary-5.1

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.9

5 years ago

0.1.3

5 years ago

0.1.6

5 years ago

0.0.6-canary.1

5 years ago

0.0.6-canary.2

5 years ago

0.0.6-canary.7

5 years ago

0.0.5-canary.132

5 years ago

0.0.5-canary.131

5 years ago

0.0.5-canary.130

5 years ago

0.0.5-canary.129

5 years ago

0.0.5-canary.128

5 years ago

0.0.5-canary.126

5 years ago

0.0.4

5 years ago

0.0.5-canary.0

5 years ago

0.0.4-canary.126

5 years ago

0.0.4-canary.125

5 years ago

0.0.4-canary.124

5 years ago