什么是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
创建测试(创建新测试,录制脚本,保存和回放)
检验数据:插入检查点
增强测试:进行脚本编程,如检查点检查
运行测试
分析结果
维护测试:当测试对象 发生改变时
Benefit of automationg test:
QTP测试的步骤:
The QuickTest testing process consists of seven main phases:
-
- Preparing to record
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.
- Recording a session on your application
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.
- 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.
- Debugging your test
You debug a test to ensure that it operates smoothly and without interruption.
- Running your test
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.
- Analyzing the test results
You examine the test results to pinpoint defects in your application.
- Reporting defects
If you have Quality Center installed, you can report the defects you discover to a database. Quality Center is the Mercury test management solution.