Coder Social home page Coder Social logo

wdio-mochawesome-reporter's Introduction

WDIO Mochawesome Reporter

Build Status NPM version npm

Generates test results in the json formated needed to create Mochawesome reports.

Installation

npm install --save wdio-mochawesome-reporter

A dependency will be added to your package.json

{
  "dependencies": {
    "wdio-mochawesome-reporter": "^1.0.0"
  }
}

Using

Add mochawesome to the reporters array in your wdio config file.

// sample wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', 'mochawesome'],
  // ...
};

Reporter Configurations

The following configuration options are supported:

option default description
includeScreenshots false All screenshots captured during test execution will be embedded in the report
screenshotUseRelativePath false By default sreenshots embeded in a report use an absolute path. Set this option to true and have screenshot paths be relative to the mochawesome report folder. This is useful if you want to publish the report to a static web server or zip it as a complete artifact of a build

To use a configuration option add a mochawesomeOpts section to your wdio config. Then add any options.

// sample wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot', 'mochawesome'],
  mochawesomeOpts: {
      includeScreenshots:true,
      screenshotUseRelativePath:true
  },
  // ...
};

Mochawesome Report Generator

To convert the json generated by this package into a Mochawesome report you will need to use the Mochawesome Report Generator.

In summary...

  • Add the package to your project
npm install --save mochawesome-report-generator
  • Add a script to your package.json to generate the report
  "scripts": {
    "generateMochawesome":"marge path/to/results.json --reportTitle 'My Project Results'"
  },
  1. path/to/results.json = path and name of json file
  2. `--reportTitle 'My Project Results' = unique report title

Version Compatibility

v1.x of wdio-mochawesome-reporter is compatible with 2.3.2 of mochawesome-report-generator

v2.x of wdio-mochawesome-reporter is compatible with version 3.1.3 of mochawesome-report-generator

wdio-mochawesome-reporter's People

Contributors

fijijavis avatar snoblenet avatar marcelas 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.