ezsystems/behat-screenshot-image-driver-cloudinary 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ezsystems/behat-screenshot-image-driver-cloudinary

最新稳定版本:v1.1.5

Composer 安装命令:

composer require ezsystems/behat-screenshot-image-driver-cloudinary

包简介

Cloudinary image driver for bex/behat-screenshot behat extension

README 文档

README

This package is an image driver for the bex/behat-screenshot behat extension which can upload the screenshot to Cloudinary and print the url of the uploaded image.

Installation

Install by adding to your composer.json:

composer require --dev ezsystems/behat-screenshot-image-driver-cloudinary

Configuration

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

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

You can choose how to upload files:

  • signed upload: export the Cloudinary values (cloud name, API Key and API Secret) as environmental variables
  • unsigned upload: set the cloud_name and preset in configuration
default:
  extensions:
      Bex\Behat\ScreenshotExtension:
          active_image_drivers: cloudinary
          image_drivers:
              cloudinary:
                  screenshot_directory: /tmp/behat-screenshot/
                  cloud_name: X
                  preset: Y

Other options:

  • limit: specifies the number of screenshots that can be taken in a single Behat run. It's based on number of files in screenshot_directory, so make sure that the folder is empty before the tests are run and cleaned only after the whole suite, not after every test. Limit checking can be disabled by exporting the DISABLE_BEHAT_SCREENSHOT_LIMIT variable.

Usage

When a step fails a screenshot will be taken and uploaded to Cloudinary. URL of the uploaded image will be displayed in the Behat log.

  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://res.cloudinary.com/cloud_name/image/upload/IMAGE_LINK.png
    Then I should have a skipped step # FeatureContext::skippedStep()

COPYRIGHT

Copyright (C) 1999-2021 Ibexa AS (formerly eZ Systems AS). All rights reserved.

LICENSE

This source code is available separately under the following licenses:

A - Ibexa Business Use License Agreement (Ibexa BUL), version 2.4 or later versions (as license terms may be updated from time to time) Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription, as described at: https://www.ibexa.co/product For the full Ibexa BUL license text, please see:

AND

B - GNU General Public License, version 2 Grants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see:

统计信息

  • 总下载量: 950.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 28
  • 点击次数: 1
  • 依赖项目数: 15
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 14
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2018-09-21