- 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.
推薦閱讀
- 深入理解Django:框架內幕與實現原理
- oreilly精品圖書:軟件開發者路線圖叢書(共8冊)
- Cassandra Data Modeling and Analysis
- 深入RabbitMQ
- 網站構建技術
- Teaching with Google Classroom
- Spring Boot+Vue全棧開發實戰
- Statistical Application Development with R and Python(Second Edition)
- Python Interviews
- Kubernetes進階實戰
- Mastering Apache Storm
- 愛上C語言:C KISS
- C語言程序設計實踐
- Angular Design Patterns
- Machine Learning for OpenCV