更新时间:2023-12-01 11:27:40
(我假设您使用的是功能测试",是指涉及整个系统或应用程序正在运行的测试.)
(I'm assuming that you're using "functional test" to mean a test involving the whole system or application being up and running.)
出于以下三个原因,我将对我编写的 new 功能进行单元测试:
I would unit test new functionality as I wrote it, for three reasons:
(这包括错误修复,如Epaga所建议.)
(This includes bug fixes, as suggested by Epaga.)
我强烈推荐迈克尔·费瑟斯(Michael Feathers)的有效地与传统一起工作代码" ,为您提供有关如何开始对不是针对其设计的代码库进行单元测试的提示.
I would strongly recommend Michael Feathers' "Working Effectively with Legacy Code" to give you tips on how to start unit testing a codebase which wasn't designed for it.