mochawesome-describe-report-generator
v1.3.0
Published
Mochawesome Describe Report Generator
Downloads
1
Maintainers
Readme
mochawesome-describe-report-generator
The Mochawesome Describe Report Generator is a library that enhances the reporting capabilities of the Mochawesome test runner by generating descriptive reports based on the test suite's describe
blocks instead of it
blocks.
Currently mochawesome reporter gives the count for it
blocks which sometime is confusing when we use describe
block for test.
Features
- Automatically generates descriptive reports based on
describe
blocks in your Mocha tests. - Provides an overview of test suites, test cases, and their corresponding descriptions.
- Improves readability and clarity of test reports.
- Easy integration with existing Mochawesome test setups.
Installation
You can install the mochawesome-describe-report-generator
using npm:
npm install mochawesome-describe-report-generator
Prerequisite:
Before using the mochawesome-describe-report-generator
package, make sure you've generated Mochawesome report and the generated report folder name must be test-results
.
Usage
To generate descriptive reports using the mochawesome-describe-report-generator
, follow the below steps:
- Install the package as mentioned in the Installation section.
- To integrate the mochawesome-describe-report-generator into your existing Mochawesome report, create
describeReport.js
file - Require the mochawesome-describe-report-generator package and call the
updateReport()
function to update the existing JSON report based on thedescribe
test suite withindescribeReport.js
node file.// describeReport.js const updateReport = require('mochawesome-describe-report-generator'); updateReport();
- Execute
node describeReport.js
file to update the JSON and HTML Mochawesome report. - Open the updated JSON report file and HTML file in any Mochawesome-supported viewer to view the enhanced report.
Before mochawesome-describe-report-generator (it
block)
After mochawesome-describe-report-generator (describe
block)
GitHub Repository
For more information, contributions, and issue tracking, you can visit the Mochawesome Describe Report Generator GitHub Repository.