---
title: WebdriverIO configuration
description: Configuration properties for Allure WebdriverIO | Change allure-results directory | Configure link patterns | Add environment info
---

# Allure WebdriverIO configuration

The [Allure WebdriverIO](/docs/webdriverio/) integration behavior can be affected by some configuration options set in your project's [`wdio.conf.js`](https://webdriver.io/docs/configurationfile/) file.

To set the options, define an object after the `"allure"` string in the `reporters` configuration section. For example:

```ts
import * as os from "os";

export const config = {
  // ...
  reporters: [
    "spec",
    [
      "allure",
      {
        outputDir: "allure-results",
        issueLinkTemplate: "https://issues.example.com/{}",
        tmsLinkTemplate: "https://tms.example.com/{}",
        reportedEnvironmentVars: {
          os_platform: os.platform(),
          os_release: os.release(),
          os_version: os.version(),
          node_version: process.version,
        },
      },
    ],
  ],
};
```

## Common parameters

### issueLinkTemplate, tmsLinkTemplate

Define templates that can be used to construct full URLs from short identifiers, see the [reference](/docs/webdriverio-reference/#link). The pattern must contain `{}` at the position where the identifier should be placed.

### outputDir

Path to the directory where Allure WebdriverIO will save the test results, see [How it works](/docs/how-it-works/). If the directory does not exist, it will be created. Defaults to `allure-results`.

### reportedEnvironmentVars

Key-value pairs that will be displayed on the report's main page, see [Environment information](/docs/v2/readability/#environment-information).

## Steps and attachments

### addConsoleLogs

If `true`, Allure WebdriverIO will automatically create an [attachment](/docs/webdriverio-reference/#attachments) containing all the console output produced by the test, i.e., all the messages passed to `console.log()`.

### disableWebdriverScreenshotsReporting

If `true`, Allure WebdriverIO will **not** automatically create an attachment with each screenshot taken via the WebdriverIO's [`saveScreenshot()`](https://webdriver.io/docs/api/element/saveScreenshot/) function.

Note that you can always add screenshots manually by passing their file paths to Allure's [`attach()`](/docs/webdriverio-reference/#attachments).

### disableWebdriverStepsReporting

If `true`, Allure WebdriverIO will **not** automatically create [steps](/docs/webdriverio-reference/#steps) for each WebDriver command.

## Runner-specific parameters

### disableMochaHooks

This option is only relevant if you use the [Mocha test runner](https://webdriver.io/docs/frameworks#using-mocha).

If `true`, Allure WebdriverIO will not add Mocha hooks to the test report.

### useCucumberStepReporter

This option is only relevant if you use the [Cucumber.js test runner](https://webdriver.io/docs/frameworks#using-cucumber).

- If `false` (or omitted), each Gherkin step will be displayed as a separate test. Allure will group together steps from the same Gherkin feature and scenario by default. You can move individual steps to other locations in the hierarchies by calling the corresponding functions, see [Behavior-based hierarchy](/docs/webdriverio-reference/#behavior-based-hierarchy) and [Suite-based hierarchy](/docs/webdriverio-reference/#suite-based-hierarchy).

  Note that if you use [`Scenario Outline`](https://cucumber.io/docs/gherkin/reference/#scenario-outline) to perform the same steps with different values, this may result in multiple steps with identical names in the test report. It is recommended to [sort tests by order of execution](/docs/sorting-and-filtering/#sort-tests) when viewing such a report.

  Also note that with this option, Allure WebdriverIO does not support setting [issue links and TMS links](/docs/webdriverio-reference/#link) via Gherkin tags.

- If `true`, Allure will treat each Gherkin scenario as a test, with Gherkin steps displayed as test steps. If your step definition calls the [`allureReporter.step()`](/docs/webdriverio-reference/#test-steps) function, it will create a sub-step within the current step.

  Note that if you use [`Scenario Outline`](https://cucumber.io/docs/gherkin/reference/#scenario-outline) to perform the same steps with different values, Allure WebdriverIO will not be able to report it properly with this option turned on. Instead, the test report will only display the steps executed with the last set of values.
