How to update TestCase status in RQM using TestCase name and project name
Hi, I have requirement to update TestCase status (Pass/Fail/Incomplete etc) in RQM. I have input as Project Name and TestCase name but not sure how to retrieve that testcase details from RQM server to update status. I have below GET and PUT rest API for update status but not sure how to retrieve id based on Project name and Testcase name that needs to pass to this API. java -jar "D:\RQMUrlUtility.jar" -command GET -user xxxx -password xxxx -filepath "D:\Temp.xml" -url "https://rqmserver.abcde.corp.ae:9443/qm2/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Regression Suite - 2016/executionresult/urn:com.ibm.rqm:executionresult:0" Please help me to resolve this issue.
Regards,
|
One answer
I think what you want to do is use the "fields" parameter to query for the testcases with a particular title. You can find the documentation on how this works here: https://jazz.net/wiki/bin/view/Main/RqmApi#fields
Example:
You can select all the elements of the test case with name ${testCaseName} in project area ${projectAreaAlias} with the below URL.
https://${hostName}:9443/${contextRoot}/service/com.ibm.rqm.integration.service.IIntegrationService/resources/${projectAreaAlias}/testcase?fields=feed/entry/content/testcase[title="${testCaseName}"]/*
A concrete example might look like:
https://localhost:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testcase?fields=feed/entry/content/testcase[title="Case A"]/*
I hope that answers your question.
Comments
Jitendra Kotwal
commented Jun 15 '16, 8:26 a.m.
Thanks for quick response. I have tried with your provided URL but still not receiving expected test case details. I mean to say testcase id which I can refer for my next REST API for update status. This URL returns some different Testcases. I am new related to RQM so unable to understand issue. Is there any other way to handle this requirement?
Michael Triantafelow
commented Jun 15 '16, 10:00 a.m.
I guess maybe I don't fully understand your question. The URL in my example should return a feed of only the test cases with the title that you specify. It should return all of the properties of that test case. Is that not what you are seeing?
Jitendra Kotwal
commented Jun 15 '16, 2:41 p.m.
Let me brief about my requirement. I have two applications one is RQM where we have set of TestCases under one Project name, these testcases get executes under different TestPlan. Another side we have 3rd party Test automation tool. Whenever we run any testcase using 3rd party automation tool, I have to update testcase status (pass/fail/incomplete etc) in RQM under specific TestPlan. I have only two values common in two system 1. Project Name and 2. TestCase name.I am writing one component (using .NET C#) which will update Testcase status in RQM of particular TestPlan based on specific TestCase name and project name. I hope I have explained my requirement.
A couple of comments:
-How and where do you run your test? Is it from RQM (via an adopter) or your .NET C# component/application?
-RQM test cases do not have a status property (see https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/complexTypes/abstract-testcase.html). Instead, test case execution records (called executionworkitems in the RQM Reportable REST API) are associated to a test case (see https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/complexTypes/abstract-executionworkitem.html). The test case execution record is associated to a test case result (called executionresult in the RQM Reportable REST API), which have a state property (see https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/elements/executionresult.html#a5) containing the actual result (as displayed in the web UI).
Jitendra Kotwal
commented Jun 18 '16, 1:50 p.m.
I am running test using C# application and through that application, I am trying to update state (as you mentioned) of execution records. I think you are having correct understanding of my requirement. Can you please let me know how to achieve this requirement. Thanks for your support.
Hi Jitendrea,
Here are the steps using the RQM Reportable REST API:
1. GET the test case result (executionresult).
2. Update the state property (see https://jazz.net/products/rational-quality-manager/api-doc-6.0.2/schemas/qm_xsd/elements/executionresult.html#a5).
3. PUT the test case result (executionresult).
For more details, see https://jazz.net/wiki/bin/view/Main/RqmApi#Common_Usage_Scenarios.
Leesen Padayachee
commented Nov 17 '16, 4:00 a.m.
Hi Paul
When you say " GET the test case result (executionresult)." and the update the state, can this be done in bulk? I have searched for specific executionresults, but the " com.ibm.rqm.execution.common.state.passed" is only availalbe when you search for individual test case results. How will we be able to update in bulk if we cannot see the state with a bulk filtering?
Unfortunately, no. You could GET a feed of test case results but you would have to PUT each test case result individually. Keep in mind, only those test case results that have been created will appear in the feed. Maybe in your case, only passed test case results exist.
showing 5 of 8
show 3 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.