轉(zhuǎn)自http://blog.csdn.net/summerfang/archive/2006/05/20/746216.aspx
聰明的Web開發(fā)人員會(huì)告訴你,越快找到代碼的錯(cuò)誤,你就能越快修正它,長(zhǎng)期而言,項(xiàng)目成本越低。好了,能最有效的檢測(cè)PHP代碼中的錯(cuò)誤的工具是PHPUnit,一個(gè)開發(fā)源代碼的框架,它在你不在的時(shí)候,自動(dòng)進(jìn)行成套的單元測(cè)試。使用PHPUnit的好處是顯而易見的:
l 減少用于測(cè)試代碼的工作量
l 減少總體軟件缺陷
l 增加對(duì)代碼的信心
l 改善你和開發(fā)源代碼的團(tuán)隊(duì)伙伴的關(guān)系
直到現(xiàn)在,這個(gè)流行工具唯一的問題是缺乏文檔。為了解決這個(gè)問題,O’Reilly直接找到了源頭,PHPUnit口袋書指南的作者,也是PHPUnit的創(chuàng)造者,Sebastian Bergmann,來解決這個(gè)問題。這本書把很多難以記憶的信息,語法,PHPUnit工作的原則,統(tǒng)一到一起。它也帶來了只有技術(shù)創(chuàng)造者才能提供的洞察力和睿智忠告。而且,本書也談到了敏捷方法和極限編程中關(guān)于測(cè)試的內(nèi)容。
在O’Reilly口袋書指南最近的系列中,這本快速參考書把所有的答案都帶到了你的指尖。那些對(duì)測(cè)試PHP代碼感興趣的Web應(yīng)用程序開發(fā)者,會(huì)覺得本書是一個(gè)無價(jià)的伴侶。
--------------------------------------------------------------------------------------------------------------
原文:
Overview
Smart web developers will tell you that the sooner you detect your code mistakes, the quicker you can fix them, and the less the project will cost in the long run. Well, the most efficient way to detect your mistakes in PHP is with PHPUnit, an open source framework that automates unit testing by running a battery of tests as you go. The benefits of PHPUnit are significant:
a reduction in the effort required to frequently test code
fewer overall defects
added confidence in your code
improved relations with your open source teammates
The only problem with this popular testing tool was its lack of documentation-until now, that is. For this, O'Reilly went right to the source, as Sebastian Bergmann, the author of PHPUnit Pocket Guide, also happens to be PHPUnit's creator. This little book brings together hard-to-remember information, syntax, and rules for working with PHPUnit. It also delivers the insight and sage advice that can only come from the technology's creator. Coverage of testing under agile methodologies and Extreme Programming (XP) is also included.
The latest in O'Reilly's series of handy Pocket Guides, this quick-reference book puts all the answers are right at your fingertips. It's an invaluable companion for anyone interested in testing the PHP code they write for web applications.
posted on 2010-04-13 19:27
暗夜教父 閱讀(320)
評(píng)論(0) 編輯 收藏 引用 所屬分類:
PHP