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.