Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 2.77 KB

File metadata and controls

78 lines (51 loc) · 2.77 KB

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.

Installation

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

npm install -D newman-reporter-allure

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

You need Allure Report to be installed on your machine to generate and open the report from the result files. See the installation instructions on how to get it.

Generate Allure Report after the tests are executed:

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

Open the generated report:

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/.