8.0.4 • Published 1 year ago

@espekkaya/wdio-mocha-reporter v8.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

WDIO Mocha Reporter Plugin

This wdio plugin was created based on this.

It is working on Webdriverio v8.

If you want to use v7 or v6, you would install below version of package.

npm install @espekkaya/wdio-mocha-reporter@1.0.1 --save-dev

Installation

Firstly install in your devdependency

npm install @espekkaya/wdio-mocha-reporter --save-dev

Configuration

Your wdio.conf.js file should look like this:

import mochaReporter from '@espekkaya/wdio-mocha-reporter';

exports.config = {
    // ...
    reporters: [
        mochaReporter
    ],
    // ...
};

if you want to get aggregate result and save result into a json file;

import mochaReporter from '@espekkaya/wdio-mocha-reporter';

exports.config = {
    // ...
    reporters: [
        [mochaReporter, {
            aggregateResultPah: './', // save json file path
            isResetResult: false | true, // reset values from json file (default: true)
        }],
    ],
    // ...
};

Example of json file;

{"TestStatus":{"PASSED":0,"FAILED":0,"SKIPPED":6}}

For more information on WebdriverIO see the homepage.