转载CSDN博客-自动化测试框架剖析

上一篇 / 下一篇  2010-06-21 14:34:56

 Anatomy of an Automated Testing Framework

http://www.pragmaticsw.com/Newsletters/newsletter_2009_07_SP.htm51Testing软件测试网4LBx w5cjUd i

 51Testing软件测试网C;Pcf&qk@

    这篇文章讲到一个成功的自动化测试框架的主要组成部分和特性。51Testing软件测试网'x$Ux dH

 

-p0w9m*\%Y-P@9U0

 

`xGi0V(|0

Why Automate Your Test Cases?  (为什么要把测试用例自动化)

*g TaK!Q4Q/|0


8H2u)\K0~XVw,{0
Many companies run their regression test cases manually, so when does it make sense to begin automating your regression test cases? It makes sense to automate your test cases when you can no longer run the regression test cases on each build created. For example,if you are doing daily or weekly builds of your code to quality assurance and you cannot quickly run your regression test cases with each build, it is time to consider automating them.  Automating your test cases provide these benefits:

R ^\#}8E0T0
  • Quicker Releases(更快速的版本发布)– By having your regression test cases run automatically, your software quality team can concentrate on testing new features of your software and less time regressing existing features.
  • Higher quality releases(更高质量的版本发布)– Your software releases will have fewer bugs and require less customer support because they will be of higher quality.
  • Happier Customers(更加满意的顾客)– Your customers will be happier and more willing to serve as testimonials for future prospects.

What is an Automated Testing Framework?(为什么使用自动化测试框架)51Testing软件测试网YI#|e l3LmT+db
Most automated tools require the test engineer to understand a scripting language (VB Script, Java Script, etc.) to write their automated test cases.  These tools usually have the ability to create the scripts using record and playback, but this does not always write the most efficient scripting code and is not as re-usable and maintainable. AnAutomated Testing Frameworkis a set of assumptions, concepts, and practices that provide support for automated software testing, allowing you to re-use automated test cases, reduce maintenance, and enhance maintainability.
P8R{ GU{051Testing软件测试网[Anb]"l#D/q9z
Anatomy of a Successful Automated Testing Framework(一个成功的自动化测试框架的组成部分)
+DV/\OG'EA@D-n:_(IO0
When designing your Automated Testing Framework, consider these features, as they can dramatically improve success and reduce the chance of abandonment:51Testing软件测试网 |.o ]9\2yj2A

  1. Keyword Driven Testing(关键字驱动测试)- If your test engineers are not experts at scripting languages, consider replacing your automated scripts with keyword driven testing.  This approach allows a tester (or even a subject matter expert) to create automated tests by describing each step of the automation.  For example, if you are automating the login process of your application, your user will access your application, type in their user-id and password and press a button to login.  Traditionally, testers would do this by writing VB Script. that will navigate to your application, identify each object on the screen (user-id, password and login button), then write script. to enter in the user-id, password and to press the login button.   With keyword driven testing, the tester does not need to understand the scripting language to make this happen, they can simply describe the event (navigate to your application, enter in "abc" for the user-id, enter in "xxx" for the password, press the Login button when done). As you can imagine, this is a much simpler approach to automated testing than scripting. 
  2. Allow Data Iterations(支持数据驱动测试)-It is good practice to allow your testers to re-use automated test cases, but allow them to run them with different sets of data.  For example, you might use the same automated test case for logging into your software, but allow the test case to be run multiple times with different user-id and password combinations to test different scenarios.  If your automated testing framework is flexible enough to allow your testers to define different data iterations, it will reduce time spent creating automated test cases.
  3. Allow Running on Multiple Hosts(支持多机运行)- When designing your automated testing framework, consider multiple hosts.  For example, as your quality assurance demands grow, you may need to setup a QA Lab with multiple servers.   Once that is done, you will need a way to launch your automated test cases on multiple servers, so consider building that into your automation framework.
  4. Allow Scheduling of Automation Runs(支持定时自动运行)- Once you have developed your automated test cases, you will want to schedule them so that they can run unattended.   When designing your automation framework, build in the capabilities to schedule automation runs at different intervals (days of the week), allow recurrence (run every day at6 p.m., etc.), and allow them to be scheduled on different hosts.
  5. Reporting Run Results(报告运行的结果)- When developing your automation framework, consider how you will report on the run activity of your automation effort.  If you are using an existing test management solution for your manual test effort, consider integrating your automated test result data in with the reporting of your test management solution, that way you can analyze your manual and automated test effort in a consolidated fashion.

 

kn8^9U f"G,mA ^T0

TAG:

 

评分:0

我来说两句

花怡蝶

花怡蝶

认认真真测试,踏踏实实学习,快快乐乐生活!

我的栏目

日历

« 2024-04-11  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 5340
  • 日志数: 15
  • 书签数: 11
  • 建立时间: 2009-02-24
  • 更新时间: 2011-10-25

RSS订阅

Open Toolbar