博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phpunit 单元测试框架-代码覆盖率
阅读量:5282 次
发布时间:2019-06-14

本文共 1328 字,大约阅读时间需要 4 分钟。

"phpize not found" 的解决办法: apt-get install php5-dev

 

--------------------------------------------------------------------------------------

As a follow up to my previous post about  I slightly changed the process and installed  instead of Zend Debugger. This was mainly so that I could generate nice code coverage reports for my unit tests–and it was easy to setup.

To install xdebug all I had to do was:

% port install php5-xdebug

and then I edit my previous ini file to use xdebug instead:

zend_extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.soxdebug.remote_enable=onxdebug.default_enable=onxdebug.remote_autostart=onxdebug.remote_host=127.0.0.1,192.168.0/24,10.37.129.2,10.211.55.2

The only other change was that I selected XDebug instead of Zend Debugger as the engine in the debug profile I had previously setup in Zend Studio.

With XDebug, the debugging in Zend Studio is the same however I can now generate nice  for my PHPUnit tests:

phpunit --coverage-html ./report MyTests.php

The report lets you view each individual file that was included in the execution:

Note: if you’re using this you may want to increase the memory assigned to your command line PHP ini file. The report generation is a memory hog so I bumped mine to 512MB just to be safe.

转载于:https://www.cnblogs.com/oxspirt/p/8184691.html

你可能感兴趣的文章
octave基本操作
查看>>
axure学习点
查看>>
WPF文本框只允许输入数字[转]
查看>>
dom4j 通用解析器,解析成List<Map<String,Object>>
查看>>
第一个项目--用bootstrap实现美工设计的首页
查看>>
使用XML传递数据
查看>>
TYVJ.1864.[Poetize I]守卫者的挑战(概率DP)
查看>>
0925 韩顺平java视频
查看>>
iOS-程序启动原理和UIApplication
查看>>
mysql 8.0 zip包安装
查看>>
awk 统计
查看>>
模板设计模式的应用
查看>>
实训第五天
查看>>
平台维护流程
查看>>
2012暑期川西旅游之总结
查看>>
12010 解密QQ号(队列)
查看>>
2014年辛星完全解读Javascript第一节
查看>>
装配SpringBean(一)--依赖注入
查看>>
java选择文件时提供图像缩略图[转]
查看>>
方维分享系统二次开发, 给评论、主题、回复、活动 加审核的功能
查看>>