![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cypress-mochawesome-reporter
Advanced tools
Zero config Mochawesome reporter for Cypress with screenshots
The cypress-mochawesome-reporter is an npm package that integrates Mochawesome reporting with Cypress, allowing you to generate detailed, visually appealing test reports for your Cypress tests.
Generate HTML Reports
This feature allows you to generate HTML reports for your Cypress tests. By including the plugin in your Cypress configuration, you can produce detailed and visually appealing reports.
module.exports = (on, config) => {
require('cypress-mochawesome-reporter/plugin')(on);
};
Customizable Report Options
This feature allows you to customize various options for your reports, such as the directory where reports are saved, whether to overwrite existing reports, and whether to generate HTML and JSON reports.
{
"reporter": "cypress-mochawesome-reporter",
"reporterOptions": {
"reportDir": "cypress/reports",
"overwrite": false,
"html": true,
"json": true
}
}
Screenshots and Videos Integration
This feature allows you to integrate screenshots and videos into your reports. You can add custom logic to handle screenshots and videos, making your reports more comprehensive and useful for debugging.
module.exports = (on, config) => {
require('cypress-mochawesome-reporter/plugin')(on);
on('after:screenshot', (details) => {
// Custom logic for handling screenshots
});
};
Mochawesome is a standalone reporter for Mocha tests that generates a visually appealing HTML report. It is similar to cypress-mochawesome-reporter but is not specifically designed for Cypress. It can be used with any Mocha-based testing framework.
Cypress-multi-reporters allows you to use multiple reporters for your Cypress tests. It can be used to combine different reporting formats, such as JSON and HTML, into a single test run. While it does not provide the same level of visual detail as cypress-mochawesome-reporter, it offers flexibility in combining different reporting tools.
Cypress-junit-reporter is a reporter that generates JUnit XML reports for Cypress tests. It is useful for integrating Cypress test results with CI/CD pipelines that require JUnit format. Unlike cypress-mochawesome-reporter, it focuses on XML output rather than HTML.
Zero config Mochawesome reporter for Cypress with screenshots
npm i --save-dev cypress-mochawesome-reporter
or
yarn add -D cypress-mochawesome-reporter
config file
"reporter": "cypress-mochawesome-reporter"
or command line
--reporter cypress-mochawesome-reporter
cypress/support/index.js
import 'cypress-mochawesome-reporter/register';
"cypress:report": "generate-mochawesome-report"
npm run cypress:report
Flag | Type | Default | Description |
---|---|---|---|
--jsonDir | string | [cwd]/cypress/results/json | Cypress results json folder, should be the same as reportDir in cypress.json |
--reportDir | string | [cwd]/cypress/screenshots | Cypress screenshots directory |
-o, --output | string | [cwd]/cypress/reports/html | Path to save report |
cd example
npm i
npm run serve
npm run cypress:run
npm run cypress:report
FAQs
Zero config Mochawesome reporter for Cypress with screenshots
The npm package cypress-mochawesome-reporter receives a total of 0 weekly downloads. As such, cypress-mochawesome-reporter popularity was classified as not popular.
We found that cypress-mochawesome-reporter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.