PHPackages                             allure-framework/allure-behat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. allure-framework/allure-behat

ActiveLibrary[Testing &amp; Quality](/categories/testing)

allure-framework/allure-behat
=============================

Allure Behat integration

1.1.0(7y ago)13179.9k—6.1%23[1 issues](https://github.com/allure-framework/allure-behat/issues)[8 PRs](https://github.com/allure-framework/allure-behat/pulls)Apache 2.0PHPPHP &gt;=5.5CI passing

Since Dec 5Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/allure-framework/allure-behat)[ Packagist](https://packagist.org/packages/allure-framework/allure-behat)[ RSS](/packages/allure-framework-allure-behat/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (18)Used By (0)

Allure Behat Adapter
====================

[](#allure-behat-adapter)

This is a [Behat](http://behat.org/en/latest/) extension with Formatter that produces report data for [Allure Report](https://allurereport.org/) test reporting tool.

Installation
------------

[](#installation)

To install using [Composer](https://getcomposer.org/) simply add `"allure-framework/allure-behat"` to `composer.json`:

```
...
"require": {
...
    "allure-framework/allure-behat": "~2.0.0",
...
},
...

```

Usage
-----

[](#usage)

To enable this extension in [Behat](http://behat.org/en/latest/), add it to `extensions` section of your `behat.yml` file To use Allure formatter, add `allure` to your list of formatters in `name`

```
  formatters:
    pretty: true
    allure:
      output_path: %paths.base%/build/allure
  extensions:
    Allure\Behat\AllureFormatterExtension:
      severity_key: "severity:"
      ignored_tags: "tag_ignore"
      issue_tag_prefix: "JIRA:"
      test_id_tag_prefix: "BUG:"
```

Here:

- `output_path` - defines the output dir for report XML data. Default is `./allure-results`
- `ignored_tags` - either a comma separated string or valid yaml array of Scenario tags to be ignored in reports
- `severity_key` - tag with this prefix will be interpreted (if possible) to define the Scenario severity level in reports (by default it's `normal`).
- `issue_tag_prefix` - tag with this prefix will be interpreted as Issue marker and will generate issue tracking system link for test case
- `test_id_tag_prefix` - tag with this prefix will be interpreted as Test Case Id marker and will generate TMS link for test case

### Use attachment support

[](#use-attachment-support)

To have attachments in allure report - make sure your behat runs tests with [Mink](https://github.com/minkphp/Mink)

Allure can handle exception thrown in your Context if that exception is instance of `ArtifactExceptionInterface`and get screenshots path from it.

### How does it work?

[](#how-does-it-work)

Behat has the following test structure:

```
It has Features described in separate feature files
        Each Feature contains Scenarios
            Each scenario contains Steps

```

Allure has a bit different hierarchy:

```
    Each report contains Test Suites
        A Test Suite contains Test Cases
            Every Test Case can contain one or more Steps

```

On the other hand, Allure also supports grouping Test Cases by Feature, by Story or by Severity level.

Behat Allure formatter does the following mapping:

- Behat Test Run -&gt; Allure Test Suite
- Gherkin Scenario (and every single Example in Scenario Outline, too) -&gt; Allure Test Case
- Gherkin Step -&gt; Allure Test Step

Behat Scenarios are annotated with it's feature title and description to be grouped into Allure Feature.

Behat also has tags and they are also can be used in Allure reports:

- If a tag appears in ignored\_tags configuration parameter, then it will be ignored and will not appear on Allure report
- If a tag starts with severity\_tag\_prefix, then formatter will try to interpret it's affixed part as one of the possible [Allure Severity Levels](https://github.com/allure-framework/allure-php-adapter-api/blob/master/src/Yandex/Allure/Adapter/Model/SeverityLevel.php)
- If a tag starts with test\_id\_tag\_prefix, then formatter will interpret it's affixed part as Test Case Id for your TMS
- In all other cases tag will be parsed as Allure Story annotation

### Contribution?

[](#contribution)

Feel free to open PR with changes but before pls make sure you pass tests `./vendor/behat/behat/bin/behat`

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance57

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~354 days

Recently: every ~443 days

Total

6

Last Release

1677d ago

Major Versions

1.1.0 → v2.x-dev2021-10-15

PHP version history (2 changes)1.0.0PHP &gt;=5.5

v2.x-devPHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/52278cde75b5d37f998b44090baf3fcf89ca1f05cbdfa739896f036eaa31aae6?d=identicon)[baev](/maintainers/baev)

---

Top Contributors

[![eduard-sukharev](https://avatars.githubusercontent.com/u/3235378?v=4)](https://github.com/eduard-sukharev "eduard-sukharev (11 commits)")[![baev](https://avatars.githubusercontent.com/u/2149631?v=4)](https://github.com/baev "baev (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![delatrie](https://avatars.githubusercontent.com/u/17935127?v=4)](https://github.com/delatrie "delatrie (1 commits)")[![robot-bucket](https://avatars.githubusercontent.com/u/135020565?v=4)](https://github.com/robot-bucket "robot-bucket (1 commits)")[![tikolakin](https://avatars.githubusercontent.com/u/5860505?v=4)](https://github.com/tikolakin "tikolakin (1 commits)")[![vdvukhzhilov](https://avatars.githubusercontent.com/u/17381580?v=4)](https://github.com/vdvukhzhilov "vdvukhzhilov (1 commits)")

---

Tags

allurebehatreportingBDDBehatallure

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/allure-framework-allure-behat/health.svg)

```
[![Health](https://phpackages.com/badges/allure-framework-allure-behat/health.svg)](https://phpackages.com/packages/allure-framework-allure-behat)
```

###  Alternatives

[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[laracasts/behat-laravel-extension

Laravel extension for Behat

2611.3M12](/packages/laracasts-behat-laravel-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)[ciaranmcnulty/behat-stepthroughextension

Extension for behat to help debug failing scenarios

601.6M5](/packages/ciaranmcnulty-behat-stepthroughextension)[soyuka/contexts

Behatch contexts

282.1M11](/packages/soyuka-contexts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
