軟件調(diào)試測(cè)試的十大重要基本準(zhǔn)則
下方查看歷史精選文章
大數(shù)據(jù)測(cè)試過程、策略及挑戰(zhàn)
本文是在David J. Agans所著Debugging: The Nine Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems的基礎(chǔ)之上寫的。
在書中,David羅列了他從實(shí)際經(jīng)驗(yàn)中總結(jié)出來的9條debug原則。我希望大家都能讀一下這本書。
該書篇幅短、且通俗易懂,還穿插了一些有趣的故事。不過,還是有些開發(fā)人員不愿意花時(shí)間去看這樣一本薄薄的書,所以我想對(duì)這本書的內(nèi)容做一個(gè)總結(jié)還是有意義的。
我增加了第十條準(zhǔn)則——debug數(shù)據(jù)。
十個(gè)基本準(zhǔn)則包括:
1、debug數(shù)據(jù)(Debug the data)——檢查數(shù)據(jù)是否是你所期望的
2、了解系統(tǒng)(Understand the system)
3、制造失敗(Make it fail)——重復(fù)制造問題
4、不要想、而要看(Quit thinking and look)——不要急匆匆地下結(jié)論
5、分而治之(Divide and conquer)——縮小除蟲范圍。
6、一次只改一個(gè)地方(Change just one thing at a time)
7、堅(jiān)持做復(fù)查(Keep an audit)
8、先找明顯的bug(Check the obvious first)
9、詢問其他人(Ask someone else)——詢問朋友或同事,因?yàn)殛U明一個(gè)問題有助于你理清頭緒,并集中精力找到問題所在。
10、 如果你不解決問題,問題將依然存在(If you didn't fix it then it's not fixed)——Bug不會(huì)自己消失,需要你來解決。


