我用过 pyral api
rally = Rally(server, apikey=api_key, workspace=workspace, project=project)
连接到集会比,
testfolders = rally.get('TestFolder', fetch=True, query=query_criteria)
我需要将集会中定义的所有测试用例提取为:
TF*****
-TC1
-TC2
-TC3
我需要从 testfolders 返回的 formattedID 中获取所有测试用例。
for tc in testfolders:
print(tc.Name)
print(tc.FormattedID)# this represents the TF***
tc_link=tc._ref#url for TC's https://rally1.rallydev.com/slm/webservice
query_criteria = 'TestSets = "%s"' % tp_name
testfolders = rally.get('TestFolder', fetch=True, query=query_criteria)
我尝试寻找不同的组合集来提取测试用例 tc._ref 实际上是一个
https://rally1.rallydev.com/slm/webservice/v2.0/TestFolder/XXXXX/TestCases
当我试图在浏览器中打开它时,它给出了整个测试用例列表。我需要提取那些测试用例列表。我尝试使用 urllib 访问以使用 python 访问数据,但是说未经授权的访问,我认为如果我在同一个会话上授权不应该是一个问题,因为集会对象已经实例化。对此的任何帮助将不胜感激!提前致谢
rally = Rally(server, apikey=api_key, workspace=workspace, project=project)
tp_name = "specific test case "
query_criteria = 'FormattedID = "%s"' % tp_name
testfolders = rally.get('TestFolder', fetch=True, query=query_criteria)
for tc in testfolders:
print(tc.Name)
print(tc.FormattedID)
query_criteria = 'TestSets = "%s"' % tc._ref
response = rally.get('TestCase', fetch=True, query=query_criteria)
print(response)
422 Could not read: could not read all instances of class com.f4tech.slm.domain.TestCase for class TestCase