- Notifications
You must be signed in to change notification settings - Fork23
Allure Adapter for Behat framework
License
allure-framework/allure-behat
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is aBehat extension with Formatter that produces report data forAllure Report testreporting tool.
To install usingComposer simply add"allure-framework/allure-behat" tocomposer.json:
..."require": {... "allure-framework/allure-behat": "~2.0.0",...},...To enable this extension inBehat, add it toextensions section of yourbehat.yml fileTo use Allure formatter, addallure to your list of formatters inname
formatters:pretty:trueallure:output_path:%paths.base%/build/allureextensions: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-resultsignored_tags- either a comma separated string or valid yaml array of Scenario tags to be ignored in reportsseverity_key- tag with this prefix will be interpreted (if possible) to define the Scenario severity levelin reports (by default it'snormal).issue_tag_prefix- tag with this prefix will be interpreted as Issue marker and will generate issue tracking systemlink for test casetest_id_tag_prefix- tag with this prefix will be interpreted as Test Case Id marker and will generate TMS link fortest case
To have attachments in allure report - make sure your behat runs tests withMink
Allure can handle exception thrown in your Context if that exception is instance ofArtifactExceptionInterfaceand get screenshots path from it.
Behat has the following test structure:
It has Features described in separate feature files Each Feature contains Scenarios Each scenario contains StepsAllure has a bit different hierarchy:
Each report contains Test Suites A Test Suite contains Test Cases Every Test Case can contain one or more StepsOn 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 -> 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.
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 possibleAllure Severity Levels
- If a tag starts with test_id_tag_prefix, then formatter will interpret it's affixed part asTest Case Id for your TMS
- In all other cases tag will be parsed as Allure Story annotation
Feel free to open PR with changes but before pls make sure you pass tests./vendor/behat/behat/bin/behat
About
Allure Adapter for Behat framework
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.