当我尝试使用 --coverage 标志运行测试时出现错误。
输入
php codecept.phar run acceptance testCest.php --coverage
输出
[ErrorException] file_get_contents(http://project.local/c3/report/clear): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
codeception.yml
coverage:
remote: false
enabled: true
include:
- application/*
public_html/index.php
<?php require __DIR__.'/../c3.php'; ?>
版本
PHP: 5.5.12
Xdebug: 2.5.0
Codeception: 2.0.7
感谢您的帮助!
J
最佳答案
转到
phpunit.xml
并确保文件中有类似的内容:<日志记录>
记录>运行这个命令:
$ phpunit --coverage-html ./report
现在检查转到目录并打开 html 文件。
关于php - 无法运行具有代码覆盖率的 Codeception 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27607312/