定制 phpro/grumphp-combined-coverage-extension 二次开发

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

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

phpro/grumphp-combined-coverage-extension

Composer 安装命令:

composer require phpro/grumphp-combined-coverage-extension

包简介

Combine multiple PHP coverage into a single clover XML before executing a clover check.

README 文档

README

This extension provides a way to combine multiple PHP coverage reports into a single clover XML right before running the clover_coverage task.

Installation

To install this extension, run the following command:

composer require --dev phpro/grumphp-combined-coverage-extension

Configuration

To configure this extension, add the following configuration to your grumphp.yml:

grumphp:
  tasks:
    clover_coverage:
      clover_file: your-clover-location.xml
      level: 100

  extensions:
    - 'Phpro\GrumPHPCombinedCoverageExtension\GrumPHPCombinedCoverageExtension'

parameters:
  # This directory contains all PHP .cov files that are generated by PHPUnit.
  # These will be combined into the location you configured in the clover_coverage task.
  grumphp_merge_coverage_chunks_dir: 'cov'

  # Optional:
  # By default, a built-in version of pcov will be used.
  # You can overwrite this to use your own phpcov executable.
  # @link https://github.com/sebastianbergmann/phpcov
  grumphp_merge_coverage_phpcov_executeable: '/your/phpcov'

Example usage

You can use this task together with the paratest and phpunit task. To combine the PHP coverage files into a single clover file, you can use the following configuration:

parameters:
  grumphp_merge_coverage_chunks_dir: 'cov'
  
grumphp:
    tasks:
        paratest:
            config: phpunit.xml.dist
            testsuite: unit
            coverage-php: cov/unit.cov
        phpunit:
            config_file: phpunit.xml.dist
            testsuite: functional
            coverage-php: cov/functional.cov
        clover_coverage:
            clover_file: "coverage-all.xml"
            minimum_level: 100
            metadata:
                priority: -100

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固