0

I am currently at about the 50% point in a web app's development, getting to this point by rapidly coding followed by refactoring. After reviewing with the client again at this point, the scope of the project required for completion is clear and unlikely to change.

Is it advised at this point to start implementing tests? If so, do I create tests for the functionality already completed or prioritize TDD for the remaining parts of the application?

4

1 回答 1

2

正如@zerkms 的评论中所提到的,通常建议将 TDD 用于新功能以及更改现有行为时。

为了保护您当前拥有的功能,请针对一些典型和关键场景使用一些集成测试冒烟测试。不要旨在通过这些测试实现高覆盖率,因为将来维护它们将是很大的负担。如果您坚持为发现的错误和新东西及时编写单元测试,您将获得高覆盖率。

于 2013-09-14T11:36:39.477 回答