QTP入门

什么是QTP:摘自WIKI

HP QuickTest Professional is automated testing software designed for testing various software applications and environments. It performs functional and regression testing through a user interface such as a native GUI or web interface.[7] It works by identifying the objects in the application user interface or a web page and performing desired operations (such as mouse clicks or keyboard events); it can also capture object properties like name or handler ID. HP QuickTest Professional uses a VBScript scripting language to specify the test procedure and to manipulate the objects and controls of the application under test. To perform more sophisticated actions, users may need to manipulate the underlying VBScript.[8]

Although HP QuickTest Professional is usually used for "UI Based" Test Case Automation, it also can automate some "Non-UI" based Test Cases such as file system operations and database testing.[9]

http://en.wikipedia.org/wiki/HP_QuickTest_Professional

QTP的基本功能:
创建测试(创建新测试,录制脚本,保存和回放)
检验数据:插入检查点
增强测试:进行脚本编程,如检查点检查
运行测试
分析结果

维护测试:当测试对象 发生改变时

Benefit of automationg test:


Benefits of Automated Testing

Fast
QuickTest runs tests significantly faster than human users.
Reliable
Tests perform precisely the same operations each time they are run, thereby eliminating human error.
Repeatable
You can test how the Web site or application reacts after repeated execution of the same operations.
Programmable
You can program sophisticated tests that bring out hidden information.
Comprehensive
You can build a suite of tests that covers every feature in your Web site or application.
Reusable
You can reuse tests on different versions of a Web site or application, even if the user interface changes.


QTP测试的步骤:

The QuickTest testing process consists of seven main phases:

  1. Preparing to record
  2. Before you record a test, confirm that your application and QuickTest are set to match the needs of your test.

    Make sure your application displays elements on which you want to record, such as a toolbar or a special window pane, for example, and that your application options are set as you expect for the purposes of your test.

  3. Recording a session on your application
  4. As you navigate through your application or Web site, QuickTest graphically displays each step you perform as a row in the Keyword View. A step is any user action that causes or makes a change in your application, such as clicking a link or image, or entering data in a form.

  5. Enhancing your test
    • Inserting checkpoints into your test lets you search for a specific value of a page, object, or text string, which helps you determine whether your application or site is functioning correctly.
    • Broadening the scope of your test, by replacing fixed values with parameters, lets you check how your application performs the same operations with multiple sets of data.
    • Adding logic and conditional or loop statements enables you to add sophisticated checks to your test.
  6. Debugging your test
  7. You debug a test to ensure that it operates smoothly and without interruption.

  8. Running your test
  9. You run a test to check the behavior of your application or Web site. While running, QuickTest opens the application, or connects to the Web site, and performs each step in your test.

  10. Analyzing the test results
  11. You examine the test results to pinpoint defects in your application.

  12. Reporting defects
  13. If you have Quality Center installed, you can report the defects you discover to a database. Quality Center is the Mercury test management solution.




你可能感兴趣的:(测试,application,VBScript,interface,testing,scripting)