生成 PHPUnit 报告(失败和通过的测试)
我想知道如何生成 phpunit 报告,告诉哪些测试失败以及哪些测试通过。 phpunit.xml 中有任何配置吗?除了 php 覆盖率报告之外,我找不到任何信息。
我想要像下面的图片(由 junit 生成)
谢谢
I would like to know how to generate a phpunit report which tells what tests failed and what tests passed. Any configuration in the phpunit.xml? I couldn't find any information than php coverage report.
I would something like the image below (generated by junit)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以从 junit.xml 日志文件创建几乎所有您想要的输出格式。可以找到自己执行此操作的示例
此处
,这是一个表格
和这里有更多关于该主题的信息
。如果你想要一些小型的多项目,可以使用“sismo”,这是一个非常小的 CI 服务器,可以运行所有本地项目,以便你始终了解它们的状态。
查看 symfony 项目页面了解详细信息
通常,由于大多数人不需要/想要在本地报告并希望看到更多信息,因此这不是在本地完成的,并且
使用像 Jenkins 这样的完整的持续集成服务器
演示
。它可以向您显示 PHPUnit 可以提供的所有信息以及更多信息。查看我的设置指南
可以看到安装并不难。更新:
另请参阅:SO:phpunittests 的 Web 界面 并从那里
Visual PHPUnit
工具。You can create pretty much every output format you want from the the junit.xml logfile. An example for doing it yourself can be found
here
,here is a table
andhere is a little more on the subject
.If you want something small for multi project there is "sismo", a very minimal CI server that runs all of your local projects so that you always know their status.
Check the symfony project page for details
Usually, as most people don't need/want this reporting locally and want to see a little more, this isn't done locally and
a full blown Continuous Integration server like Jenkins
is usedDemo
. It can show you all the information thatPHPUnit
can provide and much more.Check my setup guide
to see that installation isn't hard.Update:
Also see: SO: Web interface to phpunittests and from there the
Visual PHPUnit
tool.