官术网_书友最值得收藏!

Doing TDD the wrong way

As interesting as practicing TDD can be, it can also be wrongly done. Programmers new to TDD can sometimes write monster tests that are way too large and defeat the purpose of test brevity and being able to perform the TDD cycle quickly, leading to a waste of productive development time.

Partial adoption of the technique can also reduce the full benefit of TDD. In situations where only a few developers in a team use the technique and others don't, this will lead to fragmented code where a portion of code is tested and another portion is not, resulting in an unreliable application.

You should avoid writing tests for code that are naturally trivial or not required; for example, writing tests for object accessors. Tests should be run frequently, especially through the use of test runners, build tools, or continuous integration tools. Failing to run the tests often can lead to a situation where the true reflection of the state of the code base is not known even when changes have been made and components are probably failing.

主站蜘蛛池模板: 宕昌县| 华阴市| 霸州市| 杭锦后旗| 磴口县| 探索| 灌阳县| 淮滨县| 和政县| 伊金霍洛旗| 乐业县| 稻城县| 灌南县| 大姚县| 西盟| 梨树县| 台中县| 无为县| 留坝县| 潞城市| 怀远县| 湛江市| 兴仁县| 周至县| 涿鹿县| 商河县| 安阳县| 秭归县| 自贡市| 弋阳县| 福清市| 和顺县| 搜索| 嘉荫县| 中西区| 德阳市| 星座| 谷城县| 东乡族自治县| 基隆市| 庆云县|