petrgrishin/parallel-unit-test 问题修复 & 功能扩展

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

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

petrgrishin/parallel-unit-test

Composer 安装命令:

composer require petrgrishin/parallel-unit-test

包简介

Methodology of tests for parallel execution of code

README 文档

README

Methodology of tests for parallel execution of code

Installation

Add a dependency and script to your project's composer.json:

{
    "require": {
        "petrgrishin/parallel-unit-test": "dev-master"
    },
    "scripts": {
      "test:parallel": "/usr/bin/env php vendor/petrgrishin/parallel-unit-test/src/cli.php test:parallel ./home-path-for-tests"
    }
}

Create parallel test

<?php
class SimpleParallelTest extends \PHPUnit_Framework_TestCase{

    /**
     * @group before
     */
    public function testInit() {
        //One run before parallel tests
    }

    /**
     * @group parallel
     */
    public function test() {
        //Will be launched in three parallel streams
        $this->assertTrue(true);
    }
}

Run parallel test

composer test:parallel

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-25