Skip to content
Allure report logoAllure Report
Main Navigation ModulesDocumentationStarter Project

English

Español

English

Español

Appearance

Sidebar Navigation

Allure 3

Install & Upgrade

Install Allure

Upgrade Allure

Configure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Reading Allure charts

Migrate from Allure 2

Allure 2

Install & Upgrade

Install for Windows

Install for macOS

Install for Linux

Install for Node.js

Upgrade Allure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Features

Agent Mode

Test steps

Attachments

Test statuses

Assertion diffs

Sorting and filtering

Environments

Multistage Builds

Categories

Visual analytics

Test stability analysis

History and retries

Quality Gate

Global Errors and Attachments

Timeline

Export to CSV

Export metrics

Guides

JUnit 5 parametrization

JUnit 5 & Selenide: screenshots and attachments

JUnit 5 & Selenium: screenshots and attachments

Setting up JUnit 5 with GitHub Actions

Pytest parameterization

Pytest & Selenium: screenshots and attachments

Pytest & Playwright: screenshots and attachments

Pytest & Playwright: videos

Playwright parameterization

Publishing Reports to GitHub Pages

Allure Report 3: XCResults Reader

How it works

Overview

Glossary

Test result file

Container file

Categories file

Environment file

Executor file

History files

Test Identifiers

Integrations

Azure DevOps

Bamboo

GitHub Action

Gradle

Jenkins

JetBrains IDEs

Maven

TeamCity

Visual Studio Code

Frameworks

AVA

Getting started

Configuration

Reference

Axios

Getting started

Configuration

Reference

Behat

Getting started

Configuration

Reference

Behave

Getting started

Configuration

Reference

Bun

Getting started

Configuration

Reference

Chai

Getting started

Reference

Codeception

Getting started

Configuration

Reference

CodeceptJS

Getting started

Configuration

Reference

Cucumber.js

Getting started

Configuration

Reference

Cucumber-JVM

Getting started

Configuration

Reference

Cucumber.rb

Getting started

Configuration

Reference

Cypress

Getting started

Configuration

Reference

Fetch

Getting started

Configuration

Reference

Go

Getting started

Configuration

Reference

Jasmine

Getting started

Configuration

Reference

JBehave

Getting started

Configuration

Reference

Jest

Getting started

Configuration

Reference

JUnit 4

Getting started

Configuration

Reference

JUnit 5

Getting started

Configuration

Reference

Mocha

Getting started

Configuration

Reference

Newman

Getting started

Configuration

Reference

Node.js Test Runner

Getting started

Configuration

Reference

NUnit

Getting started

Configuration

Reference

PHPUnit

Getting started

Configuration

Reference

Playwright

Getting started

Configuration

Reference

pytest

Getting started

Configuration

Reference

Pytest-BDD

Getting started

Configuration

Reference

Reqnroll

Getting started

Configuration

Reference

REST Assured

Getting started

Configuration

Robot Framework

Getting started

Configuration

Reference

Rust Cargo Test

Getting started

Configuration

Reference

RSpec

Getting started

Configuration

Reference

SpecFlow

Getting started

Configuration

Reference

Spock

Getting started

Configuration

Reference

TestNG

Getting started

Configuration

Reference

Vitest

Getting started

Configuration

Reference

WebdriverIO

Getting started

Configuration

Reference

xUnit.net

Getting started

Configuration

Reference

On this page

Allure Node.js Test Runner configuration ​

The Allure Node.js Test Runner integration behavior can be configured through environment variables.

Providing configuration ​

Node.js does not pass an options object to custom test reporters, so the configuration is provided through environment variables. Most options are set via the ALLURE_NODE_TEST_CONFIG variable, which holds a JSON object:

bash
export ALLURE_NODE_TEST_CONFIG='{"resultsDir":"allure-results","globalLabels":{"layer":"api"}}'
node --test --import allure-node-test/setup --test-reporter allure-node-test/reporter
powershell
$Env:ALLURE_NODE_TEST_CONFIG = '{"resultsDir":"allure-results","globalLabels":{"layer":"api"}}'
node --test --import allure-node-test/setup --test-reporter allure-node-test/reporter

An example that combines the supported properties:

json
{
  "resultsDir": "allure-results",
  "links": {
    "issue": {
      "nameTemplate": "Issue #%s",
      "urlTemplate": "https://issues.example.com/%s"
    },
    "tms": {
      "nameTemplate": "TMS #%s",
      "urlTemplate": "https://tms.example.com/%s"
    },
    "jira": {
      "urlTemplate": "https://jira.example.com/browse/%s"
    }
  },
  "categories": [
    {
      "name": "foo",
      "messageRegex": "bar",
      "traceRegex": "baz",
      "matchedStatuses": ["failed", "broken"]
    }
  ],
  "environmentInfo": {
    "os_platform": "linux",
    "node_version": "26.1.0"
  },
  "globalLabels": {
    "layer": "api"
  }
}

Because the configuration is JSON, only values that can be represented as JSON are supported. Configuration options that require functions — listeners and link template functions — are not available.

resultsDir ​

Path to the directory where the test results will be saved, see How it works. If the directory does not exist, it will be created. Defaults to allure-results.

You can also set the output directory using the ALLURE_RESULTS_DIR environment variable. The resultsDir option takes priority over ALLURE_RESULTS_DIR if both are set.

bash
export ALLURE_RESULTS_DIR=out/allure-results
node --test --import allure-node-test/setup --test-reporter allure-node-test/reporter
powershell
$Env:ALLURE_RESULTS_DIR = "out/allure-results"
node --test --import allure-node-test/setup --test-reporter allure-node-test/reporter

links ​

A mapping of templates that can be used to construct full URLs from short identifiers.

For each type of link (see allure.link()), you can specify the following:

  • nameTemplate — a template for generating the link name when it is not provided.
  • urlTemplate — a template for generating the full link address when the provided value is an identifier rather than a full URL.

Both templates must contain %s at the position where the identifier should be placed.

For example, with the configuration above, await allure.issue("123") will produce a link with the name Issue #123 and the address https://issues.example.com/123. Allure will display the link with the appropriate icon for the issue type.

categories ​

Define custom categories that will be used to distinguish test results by their errors; see Categories.

This setting is an array, each item being an object representing one custom category. The objects may have the following properties:

  • name — a category name.
  • description — a description of the category.
  • descriptionHtml — a description of the category, in HTML format.
  • messageRegex — a regular expression that the test result's message should match.
  • traceRegex — a regular expression that the test result's trace should match.
  • matchedStatuses — an array of statuses that the test result should be one of. The valid statuses are "failed", "broken", "passed", and "skipped".
  • flaky — whether the test result should be marked as flaky.

environmentInfo ​

Key-value pairs that will be displayed on the report's main page, see Environment information.

globalLabels ​

Labels applied to every test result in the run. Useful for tagging all results with a layer, team, or environment identifier without repeating it in every test.

Can be provided as an array of { "name": ..., "value": ... } label objects:

json
{
  "globalLabels": [
    { "name": "layer", "value": "api" },
    { "name": "team", "value": "backend" }
  ]
}

Or as a plain object mapping label names to values. A name can map to a single string or an array of strings:

json
{
  "globalLabels": {
    "layer": "api",
    "team": "backend"
  }
}

Other environment variables ​

Besides ALLURE_NODE_TEST_CONFIG and ALLURE_RESULTS_DIR, the integration recognizes the following environment variables:

  • ALLURE_TESTPLAN_PATH — a path to a test plan file used to select which tests to run.
  • ALLURE_LABEL_⟨NAME⟩ — set a label globally for all tests in the run.
Pager
Previous pageGetting started
Next pageReference
Powered by

Subscribe to our newsletter

Get product news you actually need, no spam.

Subscribe
Allure TestOps
  • Overview
  • Why choose us
  • Cloud
  • Self-hosted
  • Success Stories
Company
  • Documentation
  • Blog
  • About us
  • Contact
  • Events
© 2026 Qameta Software Inc. All rights reserved.
A Markdown version of this page is available at /docs/node-test-configuration.md