在 phpdoc 输出中包括 phpunit 代码覆盖率

发布于 2024-11-06 23:36:36 字数 202 浏览 11 评论 0原文

过去,我一直使用 phpdoc、phpunit(使用 xdebug 生成代码覆盖率)和 pdepend 来生成文档和代码指标。我不禁觉得事情看起来有点脱节。理想情况下,我希望将代码覆盖率报告、测试结果和指标与 phpdoc 输出集成到一处。我没有使用任何 CI 系统。

有什么可以帮助我实现我想做的事情,或者我基本上需要开始破解 phpdoc 和/或 smarty 模板吗?

For the past while I've been using phpdoc, phpunit (with xdebug for code coverage generation) and pdepend to produce documentation and code metrics. I can't help but think that things look a bit disjointed. Ideally I'd like to integrate the code coverage reports, test results and metrics together in one place — with the phpdoc output. I'm not using any CI system.

Is there anything that can help me achieve what I want to do or do I basically need to start hacking away at phpdoc and/or smarty templates?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百合的盛世恋 2024-11-13 23:36:36

我认为没有一个工具可以将 phpdoc 和 phpunit 代码覆盖率结合起来。

对于其他工具,您可以查看“phpcb” - PHP 代码浏览器

它将结合“PHP Code Sniffer”、“PHP Mess Detector”和 PHPUnits“CRAP”索引的结果,为您提供一个源代码浏览器,您可以在一个位置查看代码和所有错误。

示例项目的屏幕截图:

phpcb-overview-page

phpcb-classview-page

I don't think there is a tool for combining phpdoc and the phpunit code coverage.

For the other tools you can check out "phpcb" - The PHP Code Browser.

It will combine the result from "PHP Code Sniffer", "PHP Mess Detector" and PHPUnits "CRAP" index by giving you a source code browser where you can look at the code an all the errors in one place.

Screenshots from a sample project:

phpcb-overview-page

phpcb-classview-page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文