通过OTA从Quality Center中的测试实验室获取所有“测试脚本"运行 [英] Getting all the 'Runs' of Test Scripts from Test Lab in Quality Center through OTA

查看:103
本文介绍了通过OTA从Quality Center中的测试实验室获取所有“测试脚本"运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我完成以下任务吗?这将是极大的帮助.

Could some one help me in getting the below task done. It will be great help.

例如:

我在质量控制中特定路径的测试实验室中有一个测试脚本.

I have a Test Script in Test Lab in a particular path in QC.

我需要开发一个OTA,它将为我提供给出的路径中存在的测试脚本的所有运行". 说,我在路径"Path1"(基本上是测试实验室路径)中有20个脚本. 因此,当我将此路径作为输入时,是否可以获取其中存在的所有脚本及其所有执行运行. 例如:测试脚本1234最初是失败",如果是通过",则在第二天.然后,我需要从所有测试脚本的Qc中获取这两种状态.

I need to develop a OTA, which will provide me 'All Runs' of the Test Script present in the path that I give. Say, I have 20 scripts in a path "Path1"(Basically the Test Lab path). So when i give this path as input, can i get all the scripts present in it and all their execution Runs. Ex: A test script 1234 is initially "Failed", then next day if it is "Passed". Then I need to get both these statuses out from Qc for all the Test Scripts.

这可能吗?我知道,我们需要访问给定路径中的脚本的RUN表.但是有人可以帮我吗?

Is this possible? I knew, we need to access the RUN table for the scripts in the given path. But could some one help me.

先谢谢您!.

推荐答案

首先,您需要获取脚本所在的测试集. (下面的示例在Ruby中,但是对其进行改编应该没问题.@tdc是TDConnection对象):

First you need to get the test set in which your scripts are located. (The example below is in Ruby, but it should be no problem to adapt it. @tdc is the TDConnection object):

test_set_tree_manager = @tdc.TestSetTreeManager
test_set_folder = test_set_tree_manager.NodeByPath("Root\\Some\\Path\\To\\Lab\\Folder")
test_set_list = test_set_folder.FindTestSets("Name of test set")
test_set = test_set_list.Item(1)

然后,您需要获取要从中获取运行的测试实例(TSTest):

Then you need to get the test instances (TSTest) from which you want to get the runs:

test_set_factory = test_set.TSTestFactory
found_test_instances = test_set_factory.NewList("")

最后,从某个测试实例获取所有运行:

Finally, get all the runs from some test instance:

test_instance = found_test_instances.Item(1)
run_factory = test_instance.RunFactory
runs = run_factory.NewList("")

runs是一个列表,其中包含test_instance的所有测试运行.

runs is a List which contains all the test runs of test_instance.

这篇关于通过OTA从Quality Center中的测试实验室获取所有“测试脚本"运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆