Embedding constants in code is obviously foolish. But that’s what we do with capture utilities. We create a test script by capturing an exact sequence of exact keystrokes, mouse movements, or commands. These are constants, just like 2 and 3. The slightest change to the program’s user interface and the script is invalid. The maintenance costs associated with captured test cases are unacceptable.
在代码中嵌入常量显然是愚蠢的。然而,这就是我们用截取工具得到的结果。我们通过截取一段敲键、移动鼠标或者命令行序列来创建一个测试脚本。这本身就是常量,就好象2和3。于是,程序用户界面的最微小的改变也会导致脚本无效。因此,与截取测试用例有关的可维护性开销是不能被接受的。
Capture utilities can help you script tests by showing you how the test tool interprets a manual test case. They are not useless. But they are dangerous if you try to do too much with them.