- 相關(guān)推薦
你有任何測(cè)試的實(shí)踐經(jīng)驗(yàn)嗎?
Test everything that you want to work
More test methods in your TestCase than in the class you are testing
Tests should be as fine grained as possible
Tests should be independent
Should not take long to run (a few seconds)
Easy to understand and read
Make them safe
Developers must know they are not destructive
All developers must know about them
Everyone who touches the code must run the tests.
Determines how much of your code is covered by tests
If developer changes functionality, they may need to update test
Warning: you’ve changed the interface. Did you break someone else?
Even better, all tests pass AND new tests were added for new code
All tests pass all the time
Don’t allow even one test the “always fails”
Track down and fix the broken test immediately
Automate running of tests
Ex. All tests on tip revision of code get run automatically once per day with failures emailed.
Run tests on code check-in
Run tests before deployment
Have a reasonable copy of your production environment in a dev area.
參考翻譯:
測(cè)試你想做的一切
在你的測(cè)試用例的測(cè)試方法比你更多的類測(cè)試
試驗(yàn)應(yīng)盡可能細(xì)
測(cè)試應(yīng)該是獨(dú)立的
不宜長(zhǎng)時(shí)間跑(幾秒鐘)
易于理解和閱讀
使他們安全
開(kāi)發(fā)商必須知道,他們沒(méi)有破壞性
所有開(kāi)發(fā)人員必須了解他們
每一個(gè)觸摸代碼的人都必須運(yùn)行測(cè)試,
你有任何測(cè)試的實(shí)踐經(jīng)驗(yàn)嗎?
,資料共享平臺(tái)
《你有任何測(cè)試的實(shí)踐經(jīng)驗(yàn)嗎?》(http://www.msguai.com)。確定您的代碼的多少是由測(cè)試覆蓋的
如果開(kāi)發(fā)人員更改功能,則可能需要更新測(cè)試
警告:您已經(jīng)更改了接口。你打破別人了嗎?
甚至更好,所有測(cè)試通過(guò),新的測(cè)試,增加了新的代碼
所有的測(cè)試都通過(guò)所有的時(shí)間
不要讓哪怕是一次“失敗”
追蹤并修復(fù)損壞的測(cè)試
自動(dòng)化測(cè)試
如所有的測(cè)試代碼提示修改得到的失敗每日自動(dòng)運(yùn)行電子郵件。
運(yùn)行測(cè)試代碼簽入
部署前運(yùn)行測(cè)試
有一個(gè)合理的生產(chǎn)環(huán)境在開(kāi)發(fā)區(qū)復(fù)制。
【你有任何測(cè)試的實(shí)踐經(jīng)驗(yàn)嗎?】相關(guān)文章:
貧窮的性格,你有嗎06-09
有社會(huì)實(shí)踐經(jīng)驗(yàn)的自我評(píng)價(jià)06-29
職場(chǎng)中的10種心理弱點(diǎn),你有嗎08-09
測(cè)試你的煩惱根源所在10-22
測(cè)試:你適合什么職業(yè)09-14
這些職場(chǎng)人不成熟表現(xiàn)你有嗎09-07
你的員工忠誠(chéng)嗎07-12
你是職場(chǎng)精英嗎05-18