brunty/behat-speedtrap

Behat 内部用于记录慢场景的扩展。

0.3 2018-02-21 12:33 UTC

This package is auto-updated.

Last update: 2024-09-06 09:43:03 UTC


README

Build Status

https://github.com/johnkary/phpunit-speedtrap 启发

安装

通过 composer 安装

composer require brunty/behat-speedtrap --dev

配置

在你的 behat.yml 文件中添加以下扩展配置

default:
  extensions:
    Brunty\Behat\SpeedtrapExtension: ~

要配置慢场景的阈值(默认 2000ms),指定 scenario_threshold 配置选项

default:
  extensions:
    Brunty\Behat\SpeedtrapExtension:
      scenario_threshold: 500 # this is in ms

要配置报告的场景数量(默认 10),指定 report_length 配置选项

default:
  extensions:
    Brunty\Behat\SpeedtrapExtension:
      report_length: 2

可选地,您还可以为要报告的单个步骤设置 step_threshold。当步骤阈值为 0 时,步骤阈值被忽略。步骤阈值默认为 0(忽略)

default:
  extensions:
    Brunty\Behat\SpeedtrapExtension:
      step_threshold: 100 # this is in ms

贡献

这最初是一个小型的个人项目。

尽管这个项目很小,但开放性和包容性被高度重视。为此,已经采用了一项行为准则(列在贡献指南中)。

贡献者指南