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

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.

主站蜘蛛池模板: 长治市| 林芝县| 黎川县| 静乐县| 中西区| 盐亭县| 文成县| 潼南县| 长宁县| 扎鲁特旗| 涞源县| 武冈市| 屯留县| 平阳县| 清新县| 根河市| 乃东县| 茶陵县| 新郑市| 舟山市| 长寿区| 阜康市| 翁源县| 当阳市| 抚远县| 徐汇区| 哈尔滨市| 扶余县| 镇安县| 措勤县| 含山县| 河源市| 金沙县| 新野县| 甘南县| 琼海市| 呼和浩特市| 蒲城县| 临安市| 慈溪市| 客服|