jest-allure, mocha-allure-reporter, and mochawesome are npm packages that generate rich, visual test reports from JavaScript test suites. jest-allure integrates Allure reporting into Jest test runs, enabling detailed test metadata like steps, attachments, and severity labels. mocha-allure-reporter provides similar Allure integration but for Mocha-based test suites. mochawesome is a standalone reporter specifically for Mocha that produces self-contained HTML reports with interactive charts, test details, and embedded screenshots — without requiring external tools like the Allure CLI.
When running automated tests in JavaScript, raw console output isn’t enough for debugging, sharing results, or tracking quality over time. That’s where reporters like jest-allure, mocha-allure-reporter, and mochawesome come in — they transform test outcomes into rich, visual artifacts. But they serve different ecosystems and workflows. Let’s compare them head-to-head.
Each reporter is tightly coupled to a specific test runner.
jest-allure only works with Jest. It hooks into Jest’s event lifecycle to capture test data.
// jest.config.js
module.exports = {
reporters: [
'default',
['jest-allure', { outputDirectory: 'allure-results' }]
]
};
mocha-allure-reporter only works with Mocha. You must register it via Mocha’s --reporter flag or config.
// .mocharc.js
module.exports = {
reporter: 'mocha-allure-reporter',
reporterOptions: {
resultsDir: 'allure-results'
}
};
mochawesome also only supports Mocha, but generates its own HTML format.
// .mocharc.js
module.exports = {
reporter: 'mochawesome',
reporterOptions: {
reportDir: 'cypress/reports',
overwrite: false,
html: true,
json: false
}
};
💡 You cannot use
jest-allurewith Mocha ormochawesomewith Jest — the bindings are framework-specific.
How you get from test run to readable report differs significantly.
jest-allure and mocha-allure-reporter both produce intermediate JSON/XML files (in allure-results/ by default). To view a human-readable report, you must run the Allure CLI:
# After tests finish
allure serve allure-results
# or
allure generate allure-results && allure open
This adds a build step but enables advanced features like trend analysis and multi-run comparisons.
mochawesome, by contrast, generates a complete HTML file immediately after the test run. No extra tools needed:
# After running Mocha with mochawesome
open mochawesome-report/mochawesome.html
This makes it ideal for quick local feedback or embedding in CI artifacts without post-processing.
All three let you enrich reports with contextual data, but through different APIs.
With jest-allure, you use the global allure object inside tests:
// Jest test
it('logs in successfully', () => {
allure.step('Enter username', () => {
cy.get('#username').type('test');
});
allure.step('Submit form', () => {
cy.get('form').submit();
});
});
With mocha-allure-reporter, you access Allure via global.allure or import:
// Mocha test
it('logs in successfully', function() {
const allure = global.allure;
allure.createStep('Enter username', () => {
browser.setValue('#username', 'test');
})();
});
mochawesome doesn’t support nested steps. Instead, you log messages directly to the report using cy.log() (if using Cypress) or by attaching context via this.test:
// Mocha + Cypress
it('logs in successfully', function() {
cy.get('#username').type('test');
cy.log('Username entered'); // Appears in report
cy.get('form').submit();
});
jest-allure:
allure.attachment('Screenshot', buffer, 'image/png');
mocha-allure-reporter:
allure.addAttachment('Screenshot', buffer, 'image/png');
mochawesome automatically embeds screenshots if you’re using Cypress (via cypress-mochawesome-reporter). In pure Mocha, you’d need to manually write files and reference them — it doesn’t natively support binary attachments.
As of 2023, mocha-allure-reporter is effectively deprecated. Its GitHub repository (https://github.com/allure-framework/mocha-allure-reporter) shows no recent commits, and the official Allure documentation recommends using allure-mocha instead — a newer, more actively maintained package. If starting a new Mocha + Allure project, consider allure-mocha over mocha-allure-reporter.
jest-allure is still maintained but has known limitations with Jest’s modern worker pool architecture, which can cause flaky metadata capture in parallel runs.
mochawesome remains actively developed and is widely used in Cypress-based test suites due to its simplicity and visual clarity.
Your company runs Java, Python, and JavaScript tests, all feeding into a centralized Allure dashboard for trend analysis.
jest-allure (for Jest) or allure-mocha (not mocha-allure-reporter) for Mocha.mochawesome — it doesn’t integrate with Allure’s ecosystem.You run end-to-end tests with Cypress (which uses Mocha under the hood) and want immediate, shareable HTML reports after each run.
mochawesome with cypress-mochawesome-reporter.You want beautiful reports but don’t want contributors to install extra CLI tools.
mochawesome wins — single HTML file, no external deps.allure CLI installation.| Feature | jest-allure | mocha-allure-reporter | mochawesome |
|---|---|---|---|
| Test Runner | Jest | Mocha | Mocha |
| Report Format | Allure (requires CLI) | Allure (requires CLI) | Self-contained HTML |
| Steps Support | ✅ | ✅ | ❌ (only flat logs) |
| Binary Attachments | ✅ | ✅ | ❌ (unless via Cypress) |
| Zero External Tools | ❌ | ❌ | ✅ |
| Active Maintenance | ✅ (with caveats) | ❌ (use allure-mocha) | ✅ |
jest-allure and Mocha with allure-mocha (not mocha-allure-reporter).mochawesome is the clear winner.mocha-allure-reporter — it’s outdated and superseded by better alternatives.Choose based on your team’s toolchain maturity, not just the report’s appearance. A slick HTML file is useless if it doesn’t fit into your CI/CD pipeline or quality metrics strategy.
Choose jest-allure if you're using Jest and need to integrate with the Allure ecosystem for advanced reporting features like historical trends, environment comparisons, and team-wide dashboards. It’s ideal when your organization already uses Allure or requires its structured metadata model, but be aware it requires installing and running the Allure command-line tool to generate final reports.
Choose mocha-allure-reporter if you’re using Mocha and want to leverage Allure’s reporting capabilities, such as categorized test results, custom labels, and rich attachments. This option makes sense in environments where Allure is standardized across multiple test suites (e.g., combining Java and JavaScript tests), but note that it also depends on the Allure CLI for report generation and is not actively maintained as of 2023.
Choose mochawesome if you’re using Mocha and prefer a zero-dependency, self-contained HTML report that works out of the box. It’s excellent for CI pipelines or local debugging where you need immediate, visually clear feedback without extra tooling. However, it doesn’t support Allure-specific features like history or comparison views, and it only works with Mocha.

Allure Framework is a flexible lightweight multi-language test report tool that not only shows a very concise representation of what have been tested in a neat web report form, but allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests.
yarn add -D jest-allure
or
npm install --save-dev jest-allure
Then add jest-allure/dist/setup to setupFilesAfterEnv section of your config.
setupFilesAfterEnv: ["jest-allure/dist/setup"]
reporters: ["default", "jest-allure"],
Run your tests and enjoy 🥤🚀
You need to install the CLI in order to obtain a report.
To see a report in browser, run in console
allure serve
If you want to generate html version, run in console
allure generate
You can add description, screenshots, steps, severity and lots of other fancy stuff to your reports.
Global variable reporter available in your tests with such methods:
description(description: string): this;
severity(severity: Severity): this;
epic(epic: string): this;
feature(feature: string): this;
story(story: string): this;
startStep(name: string): this;
endStep(status?: Status): this;
addArgument(name: string): this;
addEnvironment(name: string, value: string): this;
addAttachment(name: string, buffer: any, type: string): this;
addLabel(name: string, value: string): this;
addParameter(paramName: string, name: string, value: string): this;
Example
import { Severity } from "jest-allure/dist/Reporter";
import { Feature } from "somwhere in your project";
describe("Fancy test", () => {
...
it("Test your amazing feature", async () => {
reporter
.description("Feature should work cool")
.severity(Severity.Critical)
.feature(Feature.Betting)
.story("BOND-007");
reporter.startStep("Check it's fancy");
// expect that it's fancy
reporter.endStep();
reporter.startStep("Check it's cool");
// expect that it's cool
reporter.endStep();
const screenshotBuffer = await page.screenshot();
reporter.addAttachment("Screenshot", screenshotBuffer, "image/png");
});
...
}
);
jest-allure reporter dynamically configure "setupTestFrameworkScriptFile" option in Jest configuration.
If you have your own setupTestFrameworkScriptFile file, you need to manually register allure reporter, for it you need to import jest-allure/dist/setup.
import "jest-allure/dist/setup";
In case if you have jest version > 24 just add jest-allure/dist/setup to setupFilesAfterEnv section of your config.
Denis Artyuhovich | Dmitry Bogomya |
|---|