phpunit xdebug 报告
我正在尝试使用 PHPUnit、Selenium 和 Xdebug 生成一些测试的 html 报告。我像这样运行测试:
phpunit --coverage-html ./report blah.php
但是生成的报告有些缺乏信息,并且似乎与官方文档不符 此处。
我刚刚得到一个绿色条,其中“100.00% | 0/0”作为“线条”列的值。我认为这可能是正常的,但我故意更改了测试脚本以使其失败,并且报告是相同的。我本以为它至少会告诉我它失败了。
有什么想法为什么会发生这种情况吗?
PS:我使用的是 PHPUnit 3.4.8,Xdebug 2.0.5。
I am trying to produce an html report of some tests using PHPUnit, Selenium and Xdebug. I run the test like so:
phpunit --coverage-html ./report blah.php
But the report generated is somewhat lacking in information and it doesn't seem to coincide with the official documentation here.
I just get a green bar with "100.00% | 0/0" as the value for the 'Lines' column. I thought perhaps this was normal but I altered my test script to fail deliberately and the report is the same. I would've assumed it would at least tell me that it failed.
Any ideas why this is happening?
PS: I am using PHPUnit 3.4.8, Xdebug 2.0.5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
代码覆盖率报告会告诉您测试覆盖的代码行,无论它们是否失败。这与报告测试结果不同。
Code coverage reports tell you the lines of code that your tests covered, independently of whether they failed or not. It is not the same as reporting the tests results.
@peter-lindqvist:脚本输出:
@peter-lindqvist: Output of script: