52ky 发表于 2022-10-2 16:32:05

测试驱动开发

《测试驱动开发》(中文版)设想把编程看成是滚动曲柄从井里提一桶水上来的进程。假如水桶比较小,那么仅需一个能自由滚动的曲柄就可以了。假如水桶比较大并且装满水,那么还没等水桶全面被提上来你就会很累了。你需求一个防倒转的设备,以确保每转一次可以歇息一瞬间。水桶越重,防倒转的棘齿相距越近。测试驱动开发中的测试程序就是防倒转设备上的棘齿。一旦我们的某个测试程序能工作了,你就认识,它从如今开始并且今后永久都可以工作了。比较于测试程序没有通过,你间隔让一切的测试程序都工作又近了一步。如今我们的工作是让下一个测试程序工作,然后再下一个,就这样一向进行。分析标明,要编程管理的问题越难,每次测试所覆盖的范围就应该越小。
测试驱动开发byexample.pdf
本资源由开源阁IT资料站收集。

(Test Driven Development (Chinese version) envisions programming as a process of rolling a crank to lift a bucket of water from a well. If the bucket is relatively small, it only needs a crank that can roll freely. If the bucket is large and full of water, you will be very tired before the bucket is fully lifted. You need an anti reverse device to ensure that you can rest for a moment every time you turn. The heavier the bucket is, the closer the anti reverse ratchets are. The test program in test driven development is the ratchet on the anti reverse device. Once one of our test programs works, you will realize that it can work now and forever. Compared with the failure of the test program, you are one step closer to making all the test programs work. Now our job is to make the next test program work, and then the next one, and we will continue to do so. The analysis shows that the more difficult the problems to be managed by programming, the smaller the coverage of each test should be.
Test driven development byexample.pdf
This resource is collected by Kaiyuan Pavilion IT Information Station.)




页: [1]
查看完整版本: 测试驱动开发