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

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.

主站蜘蛛池模板: 梁平县| 汪清县| 韶关市| 成都市| 连江县| 社会| 乌恰县| 永年县| 自治县| 蒙城县| 乐山市| 读书| 灵璧县| 桃园市| 桐城市| 大渡口区| 玛沁县| 酒泉市| 奉新县| 泸州市| 察哈| 昌邑市| 嘉荫县| 郸城县| 康乐县| 上虞市| 鹿泉市| 茂名市| 通海县| 桂阳县| 舟曲县| 凌海市| 福贡县| 康平县| 玉林市| 襄城县| 富阳市| 兴和县| 沾益县| 桓台县| 萝北县|