mochawesome-describe-report-generator v1.3.0
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
describeblocks 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-generatorPrerequisite:
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:
1. Install the package as mentioned in the Installation section.
2. To integrate the mochawesome-describe-report-generator into your existing Mochawesome report, create describeReport.js file
3. Require the mochawesome-describe-report-generator package and call the updateReport() function to update the existing JSON report based on the describe test suite within describeReport.js node file.
// describeReport.js
const updateReport = require('mochawesome-describe-report-generator');
updateReport();
```
4. Execute `node describeReport.js` file to update the JSON and HTML Mochawesome report.
5. 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](https://github.com/alphabin-01/mochawesome-describe-report-generator).