ezsystems/allure-behat
Composer 安装命令:
composer require ezsystems/allure-behat
包简介
Behat output formatter for use with Yandex Allure reporting tool
README 文档
README
This is a Behat extension with Formatter that produces report data for Yandex Allure test
reporting tool with eZ Systems modification introducing requirement of eZ Systems allure-php-commons.
Installation
To install using Composer simply add "ezsystems/allure-behat" to composer.json:
...
"require": {
...
"ezsystems/allure-behat": "~3.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
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-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 level in reports (by default it'snormal).issue_tag_prefix- tag with this prefix will be interpreted as Issue marker and will generate issue tracking system link for test case (using allure.issues.tracker.pattern setting for allure-cli)test_id_tag_prefix- tag with this prefix will be interpreted as Test Case Id marker and will generate TMS link for test case (using allure.tests.management.pattern setting for allure-cli)
Use attachment support
To have attachments in allure report - make sure your behat runs tests with 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?
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 -> 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 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
ezsystems/allure-behat 适用场景与选型建议
ezsystems/allure-behat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 428.12k 次下载、GitHub Stars 达 15, 最近一次更新时间为 2019 年 10 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「BDD」 「Behat」 「allure」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ezsystems/allure-behat 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ezsystems/allure-behat 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ezsystems/allure-behat 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Allure PHPUnit integration
Allure Codeception integration
Allure PHP commons
Helper that decorates any SUS with a phpspec lazy object wrapper
Allure PHPUnit integration
PHP API for Allure adapter
统计信息
- 总下载量: 428.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 12
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-10-16