---
title: Cucumber.rb configuration
description: Configuration properties for Allure Cucumber.rb | Change allure-results directory
---

# Allure Cucumber.rb configuration

Behavior of the [Allure Cucumber.rb](/docs/cucumberrb/) integration can be customized by calling the `AllureCucumber.configure()` function in your project's `features/support/env.rb` file. For example:

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.results_directory = 'allure-results'
  config.clean_results_directory = true
end
```

## results_directory

Path to the directory where Allure Cucumber.rb 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 “reports/allure-results”.

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.results_directory = 'allure-results'
end
```

## clean_results_directory

If set to `true`, the results directory will be cleaned before generating new test results.

By default, the existing data is kept intact, which allows combining results of multiple test runs into a single test report.

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.clean_results_directory = true
end
```

## logger, logging_level

Configure the logger to which Allure Cucumber.rb will send messages about the beginning and end of each test or test step.

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.logger = Logger.new($stdout, Logger::DEBUG)
  config.logging_level = Logger::INFO
end
```

## link_issue_pattern, link_tms_pattern

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

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.link_issue_pattern = 'http://www.jira.com/browse/{}'
  config.link_tms_pattern = 'http://www.jira.com/browse/{}'
end
```

## environment_properties

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

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.environment_properties = {
    os_platform: RbConfig::CONFIG['host_os'],
    ruby_version: RUBY_VERSION,
  }
end
```

## categories

Path to the [categories file](/docs/how-it-works-categories-file/). Allure Cucumber.rb will copy this file to the result directory, so that it can be used for analyzing the test results in the report.

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.categories = File.new('my_custom_categories.json')
end
```

## Gherkin tag prefixes

Allure Cucumber.rb supports setting certain details of a test via special Gherkin tags on the feature level or the scenario level. You can configure which prefixes Allure Cucumber.rb will recognize as such special tags.

- The tag prefix for setting the test's [severity](/docs/cucumberrb-reference/#severity) is specified by `severity_prefix`.

- The tag prefixes for adding [issue and TMS links](/docs/cucumberrb-reference/#link) to the test are specified by `issue_prefix` and `tms_prefix`.

- The tag prefixes for placing a test into the [behavior-based hierarchy](/docs/cucumberrb-reference/#behavior-based-hierarchy) are specified by `epic_prefix`, `feature_prefix`, `story_prefix`.

By default, Allure Cucumber.rb uses the values shown in the example below.

```ruby
require 'allure-cucumber'

AllureCucumber.configure do |config|
  config.tms_prefix      = 'TMS:'
  config.issue_prefix    = 'ISSUE:'
  config.severity_prefix = 'SEVERITY:'
  config.epic_prefix     = 'EPIC:'
  config.feature_prefix  = 'FEATURE:'
  config.story_prefix    = 'STORY:'
end
```
