从PHP安装中的测试(make test)有感
http://www.agileway.cn/?p=30PHP在安装过程中,"make" 后,会提示执行"make test" 。
然后是挺长一段时间,在运行PHP的测试程序,只见屏幕不断滚动。
最后,给出的是如下的测试结果报告(TEST RESULT SUMMARY) 。
引用
================
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
posix_initgroups(): Basic tests
Test session_decode() function : variation
Test session_encode() function : variation
Test tempnam() function: usage variations - permissions(0000 to 0777) of dir
Test mail() function : basic functionality
Test mail() function : variation force extra parameters
Bug #35447 (xml_parse_into_struct() chokes on the UTF-8 BOM)
XML Parser test: concat character data and set empty handlers
=====================================================================
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush().
SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS.
SPL: ArrayObject::__construct basic usage with ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS.
SPL: ArrayObject::exchangeArray() basic usage with object as underlying data store.
SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS.
=====================================================================
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.
严谨有纪律的PHP开发社群,仅从完备的自动化测试集就可以看出来!
很多人以为测试驱动或自动化回归测试,
是因XP这些敏捷方法出现后才冒出来的,在Java社群履行贯彻较多,
其实,这些实践是被运用已久,
且为各种社群-只要他期望能够进行高效的编程和提供高质量的作品-所广为采用的。
像自动化回归测试和持续集成这样的实践,抛开操作性层面先不说,
首先是需要深刻认识这些实践带来的巨大价值,
再上一层是整个团队要深刻认识到严格遵循这些实践的原则的重要性,
谁也不能做第一个举起石头往窗户上扔的那个人,
到位的遵循这些原则,具备高度的纪律性,
至于具体碰到的实践操作方面的困难、可能暂时的不便
-其实很多是不适应,病根所在是还没有完成思维范式的转换(Paradigm Shift)-
都是可以在实践过程中通过团队的力量,不断改进。
很多时候,团队可能刚刚开始尝试,就因暂时的不适或困难,没迈开几步,就放弃了。
这实在是很可惜的事情。
如我们所观察到的,像自动化回归测试和持续集成这样的实践,
开源项目团队的使用情况普遍好于封闭的商业的开发团队。
因为很多开源项目团队从一开始,
就要求参加项目开发的成员严格遵循这样的纪律和原则。
而许多封闭的商业开发团队,包括出资方和开发者,
认为编写大量的测试"脚手架"(其实这些测试代码不是脚手架,而是代码完备的另一面)代码,
是资源和金钱的浪费,并且感到这些纪律原则束缚了自己的手脚则大有人在。
页:
[1]