- 相關(guān)推薦
你有任何測試的實踐經(jīng)驗嗎?
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.
參考翻譯:
測試你想做的一切
在你的測試用例的測試方法比你更多的類測試
試驗應(yīng)盡可能細(xì)
測試應(yīng)該是獨立的
不宜長時間跑(幾秒鐘)
易于理解和閱讀
使他們安全
開發(fā)商必須知道,他們沒有破壞性
所有開發(fā)人員必須了解他們
每一個觸摸代碼的人都必須運行測試,
你有任何測試的實踐經(jīng)驗嗎?
,資料共享平臺
《你有任何測試的實踐經(jīng)驗嗎?》(http://www.oriental01.com)。確定您的代碼的多少是由測試覆蓋的
如果開發(fā)人員更改功能,則可能需要更新測試
警告:您已經(jīng)更改了接口。你打破別人了嗎?
甚至更好,所有測試通過,新的測試,增加了新的代碼
所有的測試都通過所有的時間
不要讓哪怕是一次“失敗”
追蹤并修復(fù)損壞的測試
自動化測試
如所有的測試代碼提示修改得到的失敗每日自動運行電子郵件。
運行測試代碼簽入
部署前運行測試
有一個合理的生產(chǎn)環(huán)境在開發(fā)區(qū)復(fù)制。
【你有任何測試的實踐經(jīng)驗嗎?】相關(guān)文章:
貧窮的性格,你有嗎06-09
有社會實踐經(jīng)驗的自我評價06-29
職場中的10種心理弱點,你有嗎08-09
測試你如何找到適合你的職業(yè)09-06
測試你的煩惱根源所在10-22
測試:你適合什么職業(yè)09-14
測試:照出你的職場心情08-09
這些職場人不成熟表現(xiàn)你有嗎09-07
你的員工忠誠嗎07-12
你是職場精英嗎05-18