Getting all the 'Runs' of Test Scripts from Test Lab in Quality Center through OTA

試著忘記壹切 提交于 2019-12-08 08:10:15

问题


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

Ex:

I have a Test Script in Test Lab in a particular path in 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.

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.

Thank you in advance..!


回答1:


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)

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 is a List which contains all the test runs of test_instance.



来源:https://stackoverflow.com/questions/22488003/getting-all-the-runs-of-test-scripts-from-test-lab-in-quality-center-through-o

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!