Socket
Socket
Sign inDemoInstall

mochawesome-report-generator

Package Overview
Dependencies
19
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mochawesome-report-generator

Generates gorgeous HTML reports from mochawesome reporter.


Version published
Weekly downloads
1.4M
increased by6.32%
Maintainers
1
Install size
71.3 MB
Created
Weekly downloads
 

Package description

What is mochawesome-report-generator?

The mochawesome-report-generator npm package is designed to generate beautiful, self-contained HTML reports for Mocha tests. This tool takes JSON output from Mocha's 'json' reporter and generates a full-fledged HTML/CSS report that helps in visualizing test runs. It's particularly useful for developers and QA engineers who need to analyze test outcomes more comprehensively.

What are mochawesome-report-generator's main functionalities?

Generate HTML Report

This feature allows users to generate an HTML report from a Mocha JSON output file. The 'marge.create' function takes the path to the JSON file and an options object where you can specify the report directory among other options.

marge.create('mochawesome.json', { reportDir: './path/to/report-dir' })

Customize Report Options

Users can customize the report generation by specifying various options such as the report directory, report title, and whether to inline assets. This allows for more personalized and potentially portable reports.

marge.create('mochawesome.json', { reportDir: './path/to/report-dir', reportTitle: 'My Project Test Report', inlineAssets: true })

Other packages similar to mochawesome-report-generator

Changelog

Source

[1.0.8] - 2017-02-16

  • Only copy external assets if they do not already exist mochawesome #76

Readme

Source

mochawesome-report-generator (marge)

npm Build Status Code Climate

marge (mochawesome-report-generator) is the counterpart to mochawesome, a custom reporter for use with the Javascript testing framework, mocha. Marge takes the JSON output from mochawesome and generates a full fledged HTML/CSS report that helps visualize your test suites.

##Features

  • All-new redesigned and streamlined report
  • At-a-glance stats including pass percentage
  • Beautiful charts
  • Support for nested describes
  • Supports pending tests
  • Filter view by test type
  • Quick navigation menu
  • Review test code inline
  • Stack trace for failed tests
  • Inline diffs for actual vs expected results
  • Responsive and mobile-friendly
  • Supports displaying additional test context
  • Custom report options
  • Offline viewing
  • CLI for generating reports independent of mochawesome

##Browser Support Tested to work in Chrome. Should work in any modern web browser including IE9+. marge generates a self-contained report that can be viewed offline.

##Sample Report

Mochawesome Report Mochawesome Report Menu

##Usage

via CLI

Install mochawesome-report-generator package

npm install -g mochawesome-report-generator

Run the command

marge [test-output.json] <options>

via Mochawesome reporter

See mochawesome docs.

##Output marge generates the following inside your project directory:

mochawesome-report/
├── assets
│   ├── app.css
│   ├── app.js
│   ├── MaterialIcons-Regular.woff
│   ├── MaterialIcons-Regular.woff2
│   ├── roboto-light-webfont.woff
│   ├── roboto-light-webfont.woff2
│   ├── roboto-medium-webfont.woff
│   ├── roboto-medium-webfont.woff2
│   ├── roboto-regular-webfont.woff
│   └── roboto-regular-webfont.woff2
└── mochawesome.html

##CLI Options

marge can be configured via command line flags

FlagTypeDefaultDescription
-f, --reportFilenamestringmochawesomeFilename of saved report
-o, --reportDirstring[cwd]/mochawesome-reportPath to save report
-t, --reportTitlestringmochawesomeReport title
-p, --reportPageTitlestringmochawesome-reportBrowser title
-i, --inlinebooleanfalseInline report assets (scripts, styles)
--chartsbooleantrueDisplay Suite charts
--codebooleantrueDisplay test code
--devbooleanfalseEnable dev mode (requires local webpack dev server)
-h, --helpShow CLI help

Boolean options can be negated by adding --no before the option. For example: --no-code would set code to false.

Keywords

FAQs

Last updated on 16 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc