【发布时间】:2016-09-22 15:44:08
【问题描述】:
- 我的机器上有两个 repo
- API
- 测试 API 的 Codeception 存储库
在 API 存储库中,我添加了 codeception+c3
"require-dev": {
"codeception/codeception": "2.*",
"codeception/c3": "2.*",
我还在 index.php 中包含了 c3.php,但是当尝试使用 --coverage 对其进行测试时,我遇到了这个错误
[PHPUnit_Framework_Exception] file_get_contents(http://local.api.codeception.com/c3/report/clear): fai 导致打开流:HTTP请求失败! HTTP/1.1 500 内部服务器错误
是否有ANY使用 Codeception 进行远程代码覆盖的在线示例?
【问题讨论】:
-
- 好的,我并不懒惰,所以我做了一个小的 repo,包含 API 和 API 的代码接收测试 - 真的不知道如何以正确的方式设置 YML github.com/Horki/remotecoverage
-
你试过显示c3中发生的错误吗?您可以使用“define('C3_CODECOVERAGE_ERROR_LOG_FILE', '/path/to/c3_error.log');”设置一个常量在包含 c3.php (@see github.com/Codeception/c3#setup) 之前,您应该在文件中看到错误,为什么会有 500 结果。
-
可能有帮助的类似错误和问题:github.com/Codeception/Codeception/issues/655
标签: php code-coverage remote-server codeception