wizaplace / phpunit-slicer
1.0
2022-04-06 09:46 UTC
Requires
- php: ^7.1|^8.0
- phpunit/phpunit: ^7|^8|^9
This package is auto-updated.
Last update: 2024-09-06 17:57:15 UTC
README
将你的PHPUnit测试套件分成块以并行运行。
用法
使用Composer安装phpunit-slicer
composer require --dev wizaplace/phpunit-slicer
不要使用vendor/bin/phpunit
运行测试套件,而是运行phpunit-slicer
vendor/bin/phpunit-slicer --slices 1/2
--slices
允许定义要使用多少个块以及运行哪个块。例如1/2
表示测试套件将分成2块,只运行第一块。
PHPUnit-slicer主要适用于持续集成:它允许在多个任务中并行运行大型测试套件。要启用此功能,只需将单个PHPUnit任务替换为2(或更多)个任务即可
vendor/bin/phpunit-slicer --slices 1/2
vendor/bin/phpunit-slicer --slices 2/2
许可证
本项目遵循MIT许可证发布。