Qtp 简明教程

QTP - Automated Testing Results

Test Results

测试结果窗口为我们提供了足够的信息来显示传递、失败等步骤。测试执行后,结果窗口会自动打开(根据默认设置)。显示以下信息:

The Test Results Window gives us sufficient information to show the steps passed, failed etc. Results window opens automatically after the execution of the test (as per default settings). The following information is displayed −

  1. Steps Passed

  2. Steps Failed

  3. Environment Parameters

  4. Graphical Statistics

qtp test results 1

Operations performed in Test Results

Converting Results to HTML

在结果查看器窗口中,导航到“文件”→“导出到文件”。导出运行结果对话框打开,如下所示:

In the Results Viewer window, navigate to "File" → "Export to File". Export Run Results dialog box opens as shown below −

qtp test results 2

我们可以选择要导出的报告类型。它可以是简要结果、详细结果,甚至可以选择节点。选择文件名并导出后,文件将保存为 .HTML 文件

We can choose what type of report is to be exported. It can be short results, detailed results or even, we can select nodes. After selecting the File Name and exporting it, the file is saved as .HTML File

Filtering the Results

可以根据状态、节点类型和迭代次数筛选结果。可以通过“测试结果窗口”中的“筛选器”按钮进行访问。

Results can be filtered based on Status, Node Type, and Iterations. It can be accessed by using the Filter button in the "Test Results Window".

qtp test results 3

Raising Defects

可以通过访问“工具”→“添加缺陷”直接从测试结果窗口窗格将缺陷记录到 QC,该窗格会打开与 ALM 的连接,如下所示:

Defects can be logged into QC directly from the Test Results Window pane by accessing "Tools" → "Add Defect" which open’s the connection to ALM as shown below −

qtp test results 4

Test Results

可以在“工具”→“选项”→“运行会话”选项卡下配置自动测试结果窗口。如果需要,我们可以将其关闭,还可以打开“会话结束时自动导出结果”。

The Automatic Test Results Window can be configured under "Tools" → "Options" → "Run Sessions" Tab. We can turn it OFF, if required, and also, we can switch ON "Automatically Export Results when session Ends".

qtp test results 5

可以根据设置录制屏幕截图或影片。可以在“工具”→“选项”→“屏幕捕获”选项卡下配置相同内容。我们可以根据以下三个条件保存屏幕截图或影片:

The screenshot or the movie can be recorded based on the settings. The same can be configured under "Tools" → "Options" → "Screen Capture" Tab. We can save the screenshot or movies based on the following three conditions −

  1. For Errors

  2. Always

  3. For Errors and Warnings

qtp test results 6