All Projects → zaqqaz → Jest Allure

zaqqaz / Jest Allure

Licence: mit
Generate Allure Report for jest. Allure Report, a flexible lightweight multi-language test report tool with the possibility to add steps, attachments, parameters and so on.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Jest Allure

Jest Mongodb
Jest preset for MongoDB in-memory server
Stars: ✭ 323 (+258.89%)
Mutual labels:  jest, tests
danger-swift-xcodesummary
A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report
Stars: ✭ 72 (-20%)
Mutual labels:  reporting, tests
Hacker News Resolve
React & Redux & Resolve implementation of Hacker News
Stars: ✭ 79 (-12.22%)
Mutual labels:  jest
Jest Environment Jsdom Global
A Jest environment that allows you to configure jsdom
Stars: ✭ 89 (-1.11%)
Mutual labels:  jest
Codecharta
CodeCharta visualizes multiple code metrics using 3D tree maps.
Stars: ✭ 85 (-5.56%)
Mutual labels:  jest
Awesome Playwright
A curated list of awesome tools, utils and projects using Playwright
Stars: ✭ 79 (-12.22%)
Mutual labels:  tests
Simplewpfreporting
Reporting in WPF (XAML) made easy
Stars: ✭ 87 (-3.33%)
Mutual labels:  reporting
Gatsby Starter Typescript Rebass Netlifycms
My default Gatsby setup. Includes rich MDX support.
Stars: ✭ 79 (-12.22%)
Mutual labels:  jest
Nodejs Backend Architecture Typescript
Node.js Backend Architecture Typescript - Learn to build a backend server for Blogging platform like Medium, FreeCodeCamp, MindOrks, AfterAcademy - Learn to write unit and integration tests - Learn to use Docker image - Open-Source Project By AfterAcademy
Stars: ✭ 1,292 (+1335.56%)
Mutual labels:  jest
Jest Marbles
Helpers library for marbles testing with Jest
Stars: ✭ 85 (-5.56%)
Mutual labels:  jest
Community
Modern Confluence alternative designed for internal & external docs, built with Golang + EmberJS
Stars: ✭ 1,286 (+1328.89%)
Mutual labels:  reporting
Reactjs Crud Boilerplate
Live Demo
Stars: ✭ 83 (-7.78%)
Mutual labels:  jest
Dockest
Docker + Jest integration testing for Node.js
Stars: ✭ 81 (-10%)
Mutual labels:  jest
Reportgenerator
ReportGenerator converts coverage reports generated by coverlet, OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo, Clover, gcov or lcov into human readable reports in various formats.
Stars: ✭ 1,276 (+1317.78%)
Mutual labels:  reporting
Alias Hq
The end-to-end solution for configuring, refactoring, maintaining and using path aliases
Stars: ✭ 77 (-14.44%)
Mutual labels:  jest
Tyu
Unit test with no initial configuration.
Stars: ✭ 89 (-1.11%)
Mutual labels:  jest
Babel Test
An opinionated library to make testing babel plugins easier.
Stars: ✭ 79 (-12.22%)
Mutual labels:  jest
Fullstack Shopping Cart
MERN stack shopping cart, written in TypeScript
Stars: ✭ 82 (-8.89%)
Mutual labels:  jest
Texreg
Conversion of R Regression Output to LaTeX or HTML Tables
Stars: ✭ 85 (-5.56%)
Mutual labels:  reporting
Express App Testing Demo
a simple express app for demonstrating testing and code coverage
Stars: ✭ 89 (-1.11%)
Mutual labels:  jest

Jest-Allure reporting plugin

Add more power to your tests using Jest-Allure. Easily generate nice reports at the end of the execution.

Awesome License: MIT PRs Welcome

GitHub followers GitHub stars GitHub watchers

Examples


Allure Report

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.

Installation

yarn add -D jest-allure

or

npm install --save-dev jest-allure

jest -v >24 ?

Then add jest-allure/dist/setup to setupFilesAfterEnv section of your config.

setupFilesAfterEnv: ["jest-allure/dist/setup"]

jest -v < 24 ?

add reporter to jest.config.js

reporters: ["default", "jest-allure"],

Run your tests and enjoy 🥤🚀


How to get a report

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

Advanced features

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");
        });
        
        ...
    }
);

What's next

  • [x] Generate report from Jest results
  • [x] Add steps support
  • [x] Add labels support
  • [x] Add attachments support
  • [x] Add more examples

Additional projects

visual-unit-tests

jest-allure-image-snapshot

Warning

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.

Contributors


Denis Artyuhovich

Dmitry Bogomya
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].