快速测试自动化

Aspire Systems 的自动化测试工程师Giri Prasad Palanivel给我们分享了他们的自动化测试成功经验,原文:

Rapid Test Automation using TestComplete
http://www.automatedqa.com/blogs/post/11-02-28/rapid-test-automation-using-testcomplete/

部分摘录如下:

关于框架设计:

Keep in mind that a framework that worked for one particular project may not be a good fit in another project. So let me list few points to consider while designing your framework.
  1. Separate your data from your tests.
  2. Build a library of common functions to aid in code reuse.
  3. Have test data/expected data in a format which is widely supported in and out of the selected automation tool selected.
  4. Try to have the framework independent of the tool/language.
  5. Accommodate exception handling and recovery scenarios.

关于录制的脚本修改:

Once you've finished recording, go back to your recorded scripts and examine the code. Look for places where you can modify it per your framework design. Ask questions like:

  • Which part of the code can be reused/modularized/parameterized?
  • How to best organize your code across suite/project/modules?
  • How tested objects are to be stored in ‘NameMapping’
  • Decide ‘TestedApps’ launch properties.

关于对象识别:

We might come across a few objects which are not readily recognized. In that case we may need to consider the following workarounds:
  • Try for a regular expression/wildcards in properties to identify the object.
  • Have a combination of properties of an object/control to identify it uniquely.
  • Relatively identify the objects – as Parent, Child and positional constraints etc.

作者的博客:

http://automate101.wordpress.com/

posted on 2011-03-06 21:45  TIB  阅读(348)  评论(0编辑  收藏  举报

导航