2017 © Pedro Peláez
 

library allure-behat

Behat output formatter for use with Yandex Allure reporting tool

image

allure-framework/allure-behat

Behat output formatter for use with Yandex Allure reporting tool

  • Wednesday, December 7, 2016
  • by vania-pooh
  • Repository
  • 7 Watchers
  • 5 Stars
  • 1,234 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Allure Behat Adapter

This is a Behat extension with Formatter that produces report data for Allure Report test reporting tool., (*1)

Installation

To install using Composer simply add "allure-framework/allure-behat" to composer.json:, (*2)

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

Usage

To enable this extension in Behat, add it to extensions section of your behat.yml file To use Allure formatter, add allure to your list of formatters in name, (*3)

  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, (*4)

Use attachment support

To have attachments in allure report - make sure your behat runs tests with Mink, (*5)

Allure can handle exception thrown in your Context if that exception is instance of ArtifactExceptionInterface and get screenshots path from it., (*6)

How does it work?

Behat has the following test structure:, (*7)

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

Allure has a bit different hierarchy:, (*8)

    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., (*9)

Behat Allure formatter does the following mapping:, (*10)

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

Behat Scenarios are annotated with it's feature title and description to be grouped into Allure Feature., (*11)

Behat also has tags and they are also can be used in Allure reports:, (*12)

  • 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
  • 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?

Feel free to open PR with changes but before pls make sure you pass tests ./vendor/behat/behat/bin/behat, (*13)

The Versions

07/12 2016

dev-master

9999999-dev

Behat output formatter for use with Yandex Allure reporting tool

  Sources   Download

Apache 2.0

The Requires

 

by Eduard Sukharev

bdd behat allure

07/12 2016

1.0.3

1.0.3.0

Behat output formatter for use with Yandex Allure reporting tool

  Sources   Download

Apache 2.0

The Requires

 

by Eduard Sukharev

bdd behat allure

07/12 2016

1.0.2

1.0.2.0

Behat output formatter for use with Yandex Allure reporting tool

  Sources   Download

Apache 2.0

The Requires

 

by Eduard Sukharev

bdd behat allure

06/12 2016

1.0.1

1.0.1.0

Behat output formatter for use with Yandex Allure reporting tool

  Sources   Download

Apache 2.0

The Requires

 

by Eduard Sukharev

bdd behat allure

05/12 2016

1.0.0

1.0.0.0

Behat output formatter for use with Yandex Allure reporting tool

  Sources   Download

Apache 2.0

The Requires

 

by Eduard Sukharev

bdd behat allure