P948.3 测试的效率【popexizhi:原书list的测试的位置】编写新的函数(编译并运行本地的单元测试)修正bug(运行测试来让bug现形,修正后再次运行单元测试)【popexizhi:这个是上一章中提到的补充单元测试的过程】每次成功编译之后(运行本地的单元测试)每次对版本控制的签入(运行所有的模块或系统的单元测试)【popexizhi:这个应该是防止签入代码的问题修改】持续不断的(专门的机器来运行)8.4 测试与遗留代码对于已存在的代码。。。。。。最好是只给最有可能出问题的代码添加测试,这样才能通过有限的投入获得更大的回报。【popexizhi: 原文给出了一个用add unittest code 用来回归测试old code 防止修改时倒退的问题,很不错的eg,可以thinking 改进类比使用一下】8.5 测试与评审P98 无论如何进行代码评审,让测试代码成为评审的一部分,既然测试代码与产品的要求一样高,它们就应该进行评审。(P109)In fact,it can sometimes be helpful to expand on the idea of "test-first design" to include both write and reviewing code before writing production code.That is , the code and review in this order:1. Write test case and/or test code2. Review test case and/or test code3.Revise test case and/or test code per review4.Write production code that passes the tests.5.Review production and test code6.Revise test and production code per review.Reviews of the test code are incredibly useful,Not only are reviews more effective than testing at finding bugs in the first place,but by having everyone involved in reviews you can impore team communication.People on the team get to see how others do testing see what the team's conventions are, and help keep everyone honest.
html tool
2013年7月30日星期二
《单元测试之道Java版》 note(五)
订阅:
博文评论 (Atom)
没有评论:
发表评论