testomatio / reporter
Testomat.io 报告器,适用于 PHPUnit & Codeception
0.4.0
2024-08-29 23:06 UTC
Requires
- nategood/httpful: ^1.0
README
安装
composer require testomatio/reporter --dev
Codeception
从 Testomatio 应用程序获取 API 密钥并将其设置为 TESTOMATIO
环境变量。启用 Testomatio\Reporter\Codeception
扩展后运行测试
在 Linux/MacOS 上
TESTOMATIO={apiKey} php vendor/bin/codecept run --ext "Testomatio\Reporter\Codeception"
在 Windows 上
set TESTOMATIO={apiKey}&& php vendor/bin/codecept run --ext "Testomatio\Reporter\Codeception"
或者,您可以将 Testomatio\Reporter\Codeception
扩展添加到套件或全局配置。只有在设置了 TESTOMATIO
环境变量时,报告器才会启动
extensions: enabled: - Testomatio\Reporter\Codeception
PHPUnit
PHPUnit v10+ 尚未实现
将 Testomatio\Reporter\PHPUnit
监听器添加到 phpunit.xml
或 phpunit.dist.xml
<listeners> <listener class="Testomatio\Reporter\PHPUnit" file="vendor/testomatio/php-reporter/src/PHPUnit.php" /> </listeners>
运行测试并提供 TESTOMATIO
API 密钥作为环境变量
在 Linux/MacOS 上
TESTOMATIO={apiKey} php vendor/bin/phpunit
在 Windows 上
set TESTOMATIO={apiKey}&& php vendor/bin/phpunit