• 测试技术
  • 博客
  • 视频
  • 开源
  • 论坛
  • 沙龙
  • 下载
  • 杂志
  • 招聘

字号: | 推荐给好友 上一篇 | 下一篇

改进自动化测试套件的可维护性(一)

发布: 2008-2-03 13:31 | 作者: 李迅  | 来源: 51CMM | 查看: 114次 | 进入领测软件测试网论坛讨论

领测软件测试网

FV)l+f7M&x 软件测试技术门户4L(WkhO+H

  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.软件测试技术门户 `}-R[N_:H@C

1W_~G4F,O2N#Hw]2B  在代码中嵌入常量显然是愚蠢的。然而,这就是我们用截取工具得到的结果。我们通过截取一段敲键、移动鼠标或者命令行序列来创建一个测试脚本。这本身就是常量,就好象2和3。于是,程序用户界面的最微小的改变也会导致脚本无效。因此,与截取测试用例有关的可维护性开销是不能被接受的。软件测试技术门户1H Yp,| GS }#CQg$t

软件测试技术门户0J V!NW R2f

  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.

B~n/E