从PHP安装中的测试(make test)有感

[url]http://www.agileway.cn/?p=30[/url]


PHP在安装过程中,"make" 后,会提示执行"make test" 。
然后是挺长一段时间,在运行PHP的测试程序,只见屏幕不断滚动。

最后,给出的是如下的测试结果报告(TEST RESULT SUMMARY) 。
[quote]

================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 56
Exts tested : 23
---------------------------------------------------------------------

Number of tests : 7593 5333
Tests skipped : 2260 ( 29.8%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 9 ( 0.1%) ( 0.2%)
Expected fail : 5 ( 0.1%) ( 0.1%)
Tests passed : 5319 ( 70.1%) ( 99.7%)
---------------------------------------------------------------------
Time taken : 332 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
posix_initgroups(): Basic tests [ext/posix/tests/posix_initgroups.phpt]
Test session_decode() function : variation [ext/session/tests/session_decode_variation3.phpt]
Test session_encode() function : variation [ext/session/tests/session_encode_variation8.phpt]
Test tempnam() function: usage variations - permissions(0000 to 0777) of dir [ext/standard/tests/file/tempnam_variation4.phpt]
Test mail() function : basic functionality [ext/standard/tests/mail/mail_basic2.phpt]
Test mail() function : variation force extra parameters [ext/standard/tests/mail/mail_variation2.phpt]
Bug #35447 (xml_parse_into_struct() chokes on the UTF-8 BOM) [ext/xml/tests/bug35447.phpt]
XML Parser test: concat character data and set empty handlers [ext/xml/tests/xml011.phpt]
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush(). [tests/output/ob_start_basic_unerasable_005.phpt]
SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic4.phpt]
SPL: ArrayObject::__construct basic usage with ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject___construct_basic5.phpt]
SPL: ArrayObject::exchangeArray() basic usage with object as underlying data store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt]
SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS. [ext/spl/tests/arrayObject_setFlags_basic1.phpt]
=====================================================================

You may have found a problem in PHP.
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.

[/quote]


严谨有纪律的PHP开发社群,仅从完备的自动化测试集就可以看出来!
很多人以为测试驱动或自动化回归测试,
是因XP这些敏捷方法出现后才冒出来的,在Java社群履行贯彻较多,
其实,这些实践是被运用已久,
且为各种社群-只要他期望能够进行高效的编程和提供高质量的作品-所广为采用的。

像自动化回归测试和持续集成这样的实践,抛开操作性层面先不说,
首先是需要深刻认识这些实践带来的巨大价值,
再上一层是整个团队要深刻认识到严格遵循这些实践的原则的重要性,
谁也不能做第一个举起石头往窗户上扔的那个人,
到位的遵循这些原则,具备高度的纪律性,
至于具体碰到的实践操作方面的困难、可能暂时的不便
-其实很多是不适应,病根所在是还没有完成思维范式的转换(Paradigm Shift)-
都是可以在实践过程中通过团队的力量,不断改进。

很多时候,团队可能刚刚开始尝试,就因暂时的不适或困难,没迈开几步,就放弃了。
这实在是很可惜的事情。

如我们所观察到的,像自动化回归测试和持续集成这样的实践,
开源项目团队的使用情况普遍好于封闭的商业的开发团队。

因为很多开源项目团队从一开始,
就要求参加项目开发的成员严格遵循这样的纪律和原则。
而许多封闭的商业开发团队,包括出资方和开发者,
认为编写大量的测试"脚手架"(其实这些测试代码不是脚手架,而是代码完备的另一面)代码,
是资源和金钱的浪费,并且感到这些纪律原则束缚了自己的手脚则大有人在。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值