- Test-Driven iOS Development with Swift
- Dr. Dominik Hauser
- 276字
- 2021-07-16 09:45:50
Disadvantages of TDD
Just like everything else in the world, TDD has some disadvantages. The main ones are:
- No silver bullet: Tests help to find bugs, but they can't find bugs that you introduce in the test code and in implementation code. If you haven't understood the problem you need to solve, writing tests most probably doesn't help.
- It seems slower at the beginning: If you start TDD, you will get the feeling that you need a longer duration of time for easy implementations. You need to think about the interfaces, write the test code, and run the tests before you can finally start writing the code.
- All the members of a team need to do it: As TDD influences the design of code, it is recommended that either all the members of a team use TDD or no one at all. In addition to this, it's sometimes difficult to justify TDD to the management because they often have the feeling that the implementation of new features takes longer if developers write code that won't end up in the product half of the time. It helps if the whole team agrees on the importance of unit tests.
- Tests need to be maintained when requirements change: Probably, the strongest argument against TDD is that the tests have to be maintained as the code has to. Whenever requirements change, you need to change the code and tests. But you are working with TDD. This means that you need to change the tests first and then make the tests pass. So, in reality, this disadvantage is the same as before when writing code that apparently takes a long time.
推薦閱讀
- .NET之美:.NET關鍵技術深入解析
- Spring 5.0 Microservices(Second Edition)
- FreeSWITCH 1.6 Cookbook
- Learning Informatica PowerCenter 10.x(Second Edition)
- Java面向對象程序開發及實戰
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰
- 軟件測試綜合技術
- JSP程序設計實例教程(第2版)
- JavaScript編程精解(原書第2版)
- Splunk Essentials
- 現代JavaScript編程:經典范例與實踐技巧
- 區塊鏈原理、架構與應用(第2版)
- 接口自動化測試持續集成:Postman+Newman+Git+Jenkins+釘釘
- vSphere High Performance Cookbook(Second Edition)
- 從零開始:Qt可視化程序設計基礎教程