承接 robertfausk/behat-screenshot-image-driver-url 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

robertfausk/behat-screenshot-image-driver-url

Composer 安装命令:

composer require robertfausk/behat-screenshot-image-driver-url

包简介

Url image driver for bex/behat-screenshot behat extension

README 文档

README

Latest Stable Version Latest Unstable Version Total Downloads License Build Status Scrutinizer Quality Score Code Coverage Software License PHP7 Compatible Open Issues Closed Issues Contributors Contributors

This package is an image driver for the bex/behat-screenshot behat extension which can upload the screenshot to local web server dir and print the url of the uploaded image. If you are in a docker like environment then this extension provide the url in log output.

Installation

Install by adding to your composer.json:

composer require --dev robertfausk/behat-screenshot-image-driver-url

Configuration

Enable the image driver in the Behat-ScreenshotExtension's config in behat.yml:

default:
  extensions:
    Bex\Behat\ScreenshotExtension:
      active_image_drivers: url

You have to choose where to upload files and the web address:

default:
    extensions:
        Bex\Behat\ScreenshotExtension:
            active_image_drivers: url
            image_drivers:
                url:
                    screenshot_directory: /var/www/html/public/screenshots # your local web server dir where the image gets saved
                    screenshot_url: https://acme/screenshots # used for creation of web url; could also be something like https://localhost:9000/screenshots
                    # you can use something similar in your ci:
                    # screenshot_url: https://acme.test.my-company.com/screenshots
                    

Usage

When a step fails a screenshot will be taken and put into web server directory. URL of the uploaded image will be displayed in the Behat log. So you can open it directly from log output:

  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 /var/www/html/public/screenshots/IMAGE_LINK.png or https://acme/screenshots/IMAGE_LINK.png
    Then I should have a skipped step # FeatureContext::skippedStep()

console output example of behat screenshot image driver url

How to upgrade?

Have a look at CHANGELOG for detailed information.

统计信息

  • 总下载量: 963
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固