Skip to content

Latest commit

 

History

History

README.md

newman-reporter-allure

A newman reporter for generating nice and clean report using Allure framework

Allure Report logo


The documentation and examples

The docs for Allure Newman are available at https://allurereport.org/docs/newman/.

Also, check out the examples at github.com/allure-examples.

Features

  • writes standard Allure results from Newman collections
  • supports Allure metadata through request and test annotations
  • works with Allure Report 2 and Allure Report 3

Installation

Install newman-reporter-allure using a package manager of your choice. For example:

npm install -D newman-reporter-allure

Install Allure Report separately when you want to render the generated allure-results:

Supported versions and platforms

  • newman >= 3.5.0
  • Linux, macOS, and Windows wherever Newman supports Node.js
  • this repository is validated in CI on Node.js 20 and 22

Usage

Enable the allure reporter via the CLI:

$ newman run "<Collection>" -e "<Environment>" -r allure

You may combine allure with other reporters:

$ newman run "<Collection>" -e "<Environment>" -r cli,allure

When the test run completes, the result files will be generated in the ./allure-results directory.

You may select another location, or further customize the reporter's behavior with the configuration options.

View the report

Use Allure Report 2:

allure generate ./allure-results -o ./allure-report
allure open ./allure-report

Or use Allure Report 3:

npx allure generate ./allure-results
npx allure open ./allure-report

Allure API

Enhance the report by utilizing the Allure API:

// @allure.label.epic:Authorization
// @allure.label.feature:BearerAuthorization
// @allure.label.story:ValidBearerToken
// @allure.label.tag:api
// @allure.label.owner:eroshenkoam
pm.test("Test Authentication", function () {
  // ...
});

More details about the API are available at https://allurereport.org/docs/newman-reference/.