mocha-allure-reporter vs jest-allure vs jasmine-allure-reporter
Allure Reporting Libraries for Testing Frameworks Comparison
1 Year
mocha-allure-reporterjest-allurejasmine-allure-reporterSimilar Packages:
What's Allure Reporting Libraries for Testing Frameworks?

Allure reporting libraries provide a way to generate visually appealing and informative test reports for various JavaScript testing frameworks. These libraries enhance the testing experience by offering detailed insights into test execution, including pass/fail status, execution time, and error messages. They help developers and QA teams understand test results quickly and effectively, facilitating better debugging and improving overall code quality. Each library integrates seamlessly with its respective testing framework, ensuring that the reporting process is straightforward and efficient.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
mocha-allure-reporter22,4104526.1 kB0-Apache-2.0
jest-allure18,99411522.8 kB35-MIT
jasmine-allure-reporter14,83435-237 years agoISC
Feature Comparison: mocha-allure-reporter vs jest-allure vs jasmine-allure-reporter

Integration

  • mocha-allure-reporter:

    mocha-allure-reporter integrates with Mocha, enabling you to generate Allure reports from your Mocha tests. It captures the essence of Mocha's testing style while providing a structured reporting format that enhances test visibility.

  • jest-allure:

    jest-allure is specifically built for Jest, making it easy to implement Allure reporting in Jest-based projects. It leverages Jest's built-in features, such as snapshot testing and parallel execution, to enhance reporting accuracy and detail.

  • jasmine-allure-reporter:

    This package integrates seamlessly with Jasmine, allowing you to add Allure reporting capabilities without altering your existing test structure. It captures test results and logs them in a format that Allure understands, ensuring a smooth reporting process.

Report Customization

  • mocha-allure-reporter:

    mocha-allure-reporter supports customization of report generation, allowing developers to specify details such as test descriptions and categories. This feature enhances the readability and organization of the test reports.

  • jest-allure:

    jest-allure provides options for customizing the report output, including the ability to adjust the level of detail in the reports. This flexibility allows developers to focus on the most relevant information for their testing needs.

  • jasmine-allure-reporter:

    This reporter allows for some customization of the generated reports, enabling you to tailor the output to meet your project's specific needs. You can configure options such as report file paths and test suite names to improve report clarity.

Ease of Use

  • mocha-allure-reporter:

    mocha-allure-reporter is easy to implement in existing Mocha projects, with clear documentation guiding users through the setup process. This simplicity allows teams to quickly adopt Allure reporting without extensive overhead.

  • jest-allure:

    jest-allure is designed for ease of integration with Jest, requiring only a few lines of configuration to enable Allure reporting. Its user-friendly setup process makes it accessible for developers of all skill levels.

  • jasmine-allure-reporter:

    The setup process for jasmine-allure-reporter is straightforward, requiring minimal configuration to get started. This ease of use makes it an attractive option for projects already using Jasmine.

Community Support

  • mocha-allure-reporter:

    mocha-allure-reporter has a dedicated user base that actively contributes to its development. The community provides valuable insights and assistance, making it easier for new users to adopt and implement the reporter.

  • jest-allure:

    jest-allure enjoys robust community backing due to Jest's popularity in the JavaScript ecosystem. This support translates to regular updates and a wealth of resources for troubleshooting and best practices.

  • jasmine-allure-reporter:

    As a widely used reporter for Jasmine, jasmine-allure-reporter benefits from a strong community that contributes to its maintenance and improvement. This community support ensures that issues are addressed promptly and that the package remains up-to-date with Jasmine's developments.

Performance Impact

  • mocha-allure-reporter:

    mocha-allure-reporter is designed to have a low performance overhead, allowing Mocha tests to run efficiently while still generating comprehensive reports. This balance is vital for teams that prioritize speed in their testing processes.

  • jest-allure:

    jest-allure is optimized for performance, ensuring that the reporting process does not hinder Jest's fast test execution capabilities. This optimization is essential for maintaining high productivity during development cycles.

  • jasmine-allure-reporter:

    The performance impact of jasmine-allure-reporter is minimal, as it efficiently logs test results without significantly slowing down test execution. This efficiency is crucial for maintaining fast feedback loops in development.

How to Choose: mocha-allure-reporter vs jest-allure vs jasmine-allure-reporter
  • mocha-allure-reporter:

    Select mocha-allure-reporter if your project is based on Mocha. This package allows you to create Allure reports from Mocha tests, providing a clear and structured output of test results. It is beneficial for projects that require flexibility in testing and reporting, leveraging Mocha's extensive features.

  • jest-allure:

    Opt for jest-allure if you are using Jest for your testing needs. This package is designed specifically for Jest and takes advantage of its features, such as parallel test execution, to generate detailed Allure reports. It is ideal for modern JavaScript applications that utilize Jest's powerful testing capabilities.

  • jasmine-allure-reporter:

    Choose jasmine-allure-reporter if you are using Jasmine as your testing framework. It integrates well with Jasmine's syntax and provides a comprehensive reporting solution that captures all test results and logs them in an Allure-compatible format, making it suitable for projects already leveraging Jasmine.

README for mocha-allure-reporter

mocha-allure-reporter Build Status

Allure reporter for Mocha

Installation

Assuming that you have mocha installed, install reporter via npm:

npm install mocha-allure-reporter

Then use it as any other mocha reporter:

mocha --reporter mocha-allure-reporter

After running tests you will get raw tests result into allure-results directory. See generator list on how to make a report from raw results.

Also check out mocha-allure-example to see it in action.

Supported options

  • targetDir (string) – directory where test results will be stored

Runtime API

Allure is a test framework which provides more data from tests than usual. Once added mocha-allure-reporter will create global allure object with the following API:

  • allure.createStep(name, stepFn) – define step function. Result of each call of this function will be recorded into report.
  • allure.createAttachement(name, content, [type]) – save attachment to test. If you're calling this inside step function or during its execution (e.g. asynchronously via promises), attachment will be saved to step function.
    • name (String) - attachment name. Note that it is not then name of the file, actual filename will be generated.
    • content (Buffer|String|Function) – attachment content. If you pass Buffer or String, it will be saved to file immediately. If you are passing Function, you will get decorated function and you can call it several times to trigger attachment. General purpose of the second case is an ability to create utility function to take screenshot. You can define function for you test framework only once and then call it each time you need a screenshot.
    • type (String, optional) – attachment MIME-type. If you omit this argument we'll try to detect type automatically via file-type library
  • allure.description(description) – set detailed test description, if test name is not enough.
  • allure.severity(severity) – set test severity, one of: blocker, critical, normal, minor, trivial. You can also use constants like allure.SEVERITY.BLOKER.
  • allure.feature(featureName) – assign feature to test
  • allure.story(storyName) – assign user story to test. See documentation for details
  • allure.addArgument(name, value) - provide parameters, which had been used in test. Unlike other languages, javascript test methods usually doesn't have special arguments (only callbacks), so developers use other way to populate parameters to test. This method is to provide them to Allure
  • allure.addEnvironment(name, value) - save environment value. It is similar to addArgument method, but it is designed to store more verbose data, like HTTP-links to test page or used package version.