[英]HP ALM Accessing Test Plan via REST API (C#)
I am trying to access test set data in QC/ALM via C# and the REST API, but I am struggling to with path navigation. 我正在尝试通过C#和REST API访问QC / ALM中的测试集数据,但我正努力进行路径导航。
In Test Lab we have a path of: 在测试实验室中,我们有一条路径:
Root
UnitTests
QA-US
QA-UK
Product1
...
Product2
Test Campaign 1
Test Campaign 2
RC 1
RC 2
I am trying to access test run details for a campaign (eg Test Campaign 1, RC 2) but I can't figure out how I do this. 我正在尝试访问广告系列的测试运行详细信息(例如,测试广告系列1,RC 2),但我不知道如何执行此操作。
I looked at this Stack Overflow question but I couldn't figure out the hierarchy path. 我看着这个堆栈溢出问题,但是我不知道层次结构路径。
I attempted to use: http://IP:PORT/qcbin/rest/domains/THEDOMAIN/projects/THEPROJECT/test-set-folders?query= {name['Root']} and get details back, but if I want a want a deeper path .. eg 'Root\\UnitTests\\QA-UK\\Product2\\Test Campaign 1\\RC 1' it fails to be found. 我尝试使用: http:// IP:PORT / qcbin / rest / domains / THEDOMAIN / projects / THEPROJECT / test-set-folders?query = {name ['Root']},然后返回详细信息,但是如果我想想要更深的路径..例如,“ Root \\ UnitTests \\ QA-UK \\ Product2 \\ Test Campaign 1 \\ RC 1”,则找不到该路径。
Any assistance would be greatly appreciated. 任何帮助将不胜感激。
You can get folder level sets using following way. 您可以使用以下方法获取文件夹级别集。 Filter on name will not work.
名称过滤功能不起作用。 You need to filter on parent-id.
您需要过滤parent-id。 Even though it is id field still HP accepts folder name.
即使是id字段,HP仍然接受文件夹名称。 Following query works on my HPALM instance and hopefully it will work with yours as well.
以下查询适用于我的HPALM实例,希望它也适用于您的实例。
http://host:port/qcbin/rest/domains/DEFAULT/projects/TestP/test-sets?query={parent-id[^Root\Path 1\Path 2^]}.
Regards 问候
Gaurav 高拉夫
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.