It's all about the answers!

Ask a question

Query Test Plan with Rest API

Canberk Akduygu (99237371) | asked Jul 01 '14, 8:51 a.m.
edited Jul 01 '14, 8:56 a.m.

I'd like to query my RQM projects to fetch 'Approved' Test Plans which contains UAT keyword in the category combobox.

I have written some REST Queries like:

https://server:9443/qm/service/|description|category[@term='Test Phase' and @value='User Acceptance Test'])

This filters my plans and bring me 2 Test Plans as I expected.

I enhanced the query like:
https://servername:9443/qm/service/[@term='Test Phase' and @value='User Acceptance Test'] | owner[@ns3:resource=''])

That brought 1 test plan as expected because user P21885 has only one Test Plan assigned to him.

I tried to filter my plans according to Approval status:
https://SERVERNAME:9443/qm/service/[@term='Test Phase' and @value='User Acceptance Test'] | state='')

But this is not working. It doesnt filter according to the status.

How should I combine my queries and get approved test plans that has User Acceptance Test set as category.

I also checked but no get query for status has worked.
Thank you in advance

Accepted answer

permanent link
Vidya Malkarnekar (1.0k15) | answered Jul 01 '14, 2:00 p.m.
Hi Canberk,

I could get the query to work after switching the order of filters.
https://SERVERNAME:9443/qm/service/[state='']/(title|category[@term='Test Phase' and @value='User Acceptance Test'])

Canberk Akduygu selected this answer as the correct answer

Canberk Akduygu commented Jul 02 '14, 1:39 a.m.

Thank you for your help.
Is it normal that parameters should be in correct order to execute properly?

Your answer

Register or to post your answer.