定制 delta-reporter/phpunit-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

delta-reporter/phpunit-client

最新稳定版本:v1.3.2

Composer 安装命令:

composer require delta-reporter/phpunit-client

包简介

Delta Reporter service for PHPUnit tests

README 文档

README

This service is intended to send information from PHPUnit tests to Delta Reporter

Installation

Installing this service is simple as adding it as a dependency to composer

  "minimum-stability": "dev",
  "require-dev": {
    "delta-reporter/phpunit-client" : "*"
  },

Configuration

Add listener to phpunit.xml

    <listeners>
        <listener class="DeltaReporter\PHPUnitService" file="vendor/delta-reporter/phpunit-client/src/PHPUnitService.php">
            <arguments>
                <string>HOST URL</string>
                <string>PROJECT NAME</string>
                <string>TEST TYPE</string>
                <boolean>ENABLED</boolean>
            </arguments>
        </listener>
    </listeners>

If the environment variable DELTA_LAUNCH_ID is not present, a new launch is going to be created on Delta Reporter automatically using the current date as PHPUnit Launch {Y-m-d\TH:i:s}

If you wish to generate a DELTA_LAUNCH_ID to pass it to several types of tests, please check this website

Sending media to Delta Reporter

You can sent images and video to Delta Reporter, these will be displayed in a container into your test

use DeltaReporter\Service\DeltaReporterHTTPService;


abstract class DemoClass extends TestCase
{

	private function demoFunction()
	{
    DeltaReporterHTTPService::saveFileForTest($path, 'img', 'Screenshot description');
  }
}

The function saveFileForTest() requires three parameters:

  • FilePath: string = Full path to upload the media file
  • Type: string = Type of media, it accept two values 'img' or 'video'
  • Description: string = Description of the media file, which is going to be displayed in a container

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-03-28