bex / behat-screenshot-image-driver-unsee
unsee.cc图像驱动程序,用于bex/behat-screenshot behat扩展
1.0.0
2015-11-14 09:05 UTC
Requires
- php: >=5.4
- behat/behat: ^3.0.0
- kriswallsmith/buzz: ^0.15.0
Requires (Dev)
- behat/mink-selenium2-driver: ^1.3.0
- bex/behat-extension-driver-locator: *
- bex/behat-screenshot: *
- bex/behat-test-runner: *
- jakoch/phantomjs-installer: ^1.9.8
- phpspec/phpspec: 2.4.0-alpha2
This package is auto-updated.
Last update: 2024-08-29 03:31:41 UTC
README
此包是bex/behat-screenshot behat扩展的图像驱动程序,可以将截图上传到Unsee并打印上传图像的URL。
安装
通过将以下内容添加到您的composer.json
中安装
composer require --dev bex/behat-screenshot-image-driver-unsee
配置
在behat.yml
中Behat-ScreenshotExtension的配置中启用图像驱动程序,如下所示
default: extensions: Bex\Behat\ScreenshotExtension: active_image_drivers: unsee
您可以根据如下方式配置上传图像的过期时间(默认为10分钟)
default: extensions: Bex\Behat\ScreenshotExtension: active_image_drivers: unsee image_drivers: unsee: expire: '10m' # possible values: '10m', '30m', '1h'
使用方法
当您运行behat且某个步骤失败时,Behat-ScreenshotExtension将自动截图并将它传递给图像驱动程序,该程序将上传图像并返回上传图像的URL。因此,您会看到如下内容
Scenario: # features/feature.feature:2 Given I have a step # FeatureContext::passingStep() When I have a failing step # FeatureContext::failingStep() Error (Exception) Screenshot has been taken. Open image at https://unsee.cc/idoftheimage Then I should have a skipped step # FeatureContext::skippedStep()