How to get the test plan OSLC url
The following URLs are both pointing to a testplan:
https://fibula5.vanlint5.nl:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/My+Reporting+%28Quality+Management%29/testplan/urn:com.ibm.rqm:testplan:6
The following link is also TP6 (used in defects):
https://fibula5.vanlint5.nl:9443/qm/oslc_qm/contexts/_ZJ9pcRklEeOfPN1jCvntow/resources/com.ibm.rqm.planning.VersionedTestPlan/_0F8nYBrVEeO9E_QFReYRSg
How can one get this 2nd URL if I've got the first? The 2nd format I can use to query the defects.
Thanks.
Marc
2 answers
Comments
I tried this. I got an error:
When I put the following URL in Poster
https://fibula5.vanlint5.nl:9443/qm/oslc_qm/catalog
I get a list of project-area's, than I can follow the links of the project of interest
https://fibula5.vanlint5.nl:9443/qm/process/project-areas/_ZJ9pcRklEeOfPN1jCvntow/links
https://fibula5.vanlint5.nl:9443/qm/oslc_qm/contexts/_ZJ9pcRklEeOfPN1jCvntow/com.ibm.rqm.planning.VersionedTestPlan
I get a 404 message back. It includes the following line:
AQXCM5008E The operation cannot be completed because the resource, en_US, was not found.
IF I get this working, it works with poster (which is at least one step). But than in RPE...Lucky RPE support is tracing this too.
Marc, you MUST use the following header:
OSLC-Core-Version = 2.0
Oke, my URL was wrong. Some more detail for others and later reference. Add the OSLC-Core-Version as a header, and the accept=text/xml.
When I put the following URL in Poster
https://fibula5.vanlint5.nl:9443/qm/oslc_qm/catalog
I get a list of project-area's, than I can follow the links of the project of interest
https://fibula5.vanlint5.nl:9443/qm/process/project-areas/_ZJ9pcRklEeOfPN1jCvntow
Than you can ask for the TP in the project with:
https://fibula5.vanlint5.nl:9443/qm/oslc_qm/contexts/_ZJ9pcRklEeOfPN1jCvntow/resources/com.ibm.rqm.planning.VersionedTestPlan
Make note the following has the /resources in i!
The method I use in RPE is to request the TP again (in separate query) with dataSourceURL+"?oslclinks=true" as link. The identifier is the OSLC version of the TP url.
You can use the oslclinks request parameter (https://jazz.net/wiki/bin/view/Main/RqmApi#oslclinks) to resolve the OSLC URL of the test artifact (see the dc:identifier property). However, defects associated to a test plan are contained in the qm:relatedChangeRequest properties (see https://jazz.net/products/rational-quality-manager/api-doc-4.0.4/schemas/qm_xsd/elements/testplan.html#a36).
Comments
Paul, thanks for you comment. True. When create a defect and manually relate this direct to a testplan, this defect is shown here. When you create a defect on a execution result the defect does not appear here. Is this a defect in RQM behaviour.
This behavior is working as designed. The qm:testplan/qm:relatedChangeRequest property is the same as the OSLC oslc_qm:TestCase/oslc_qm:relatedChangeRequest property and the qm:executionresult/qm:defect property represents the OSLC oslc_qm:TestResult/oslc_qm:affectedByChangeRequest property.
Paul,
Thanks for interacting.
Let me explain some more detail, what I experience (RQM404). In the project I've got a TP and 4 types of Wi/Defects (number - type)
97 - Defect on execution result (a 'normal' defect)
116 - Trackedby WI
117 - Trackedby WI
137 - Defect related to TP (a defect, manually added the relation "related TP").
I leverage RPE and FF/poster to extract data in different ways.
The testplan/workitem gives ONLY 116 & 117.
The testplan/relatedChangeRequest gives 116, 117 and 137. The testplan/relatedChangeRequest/summary is for 116,117 a URL and for 137, "137: A defect on TP6". So different!
I don't see any reference from the TP to the defect 97. In WI97 there is a reference (using the OSLC link) back.
So the defintion might be correct and have same base, the code is behaving differently. I'm happy to share my RPE template showing this behavior.
Thanks,Marc
Hi Marc,
If defect 97 contains a link to the test plan, the defect should appear in the test plan as qm:testplan/qm:relatedChangeRequest. If not, it's a defect.
If defect 97 contains a link to the execution result, the defect should appear in the execution result as qm:executionresult/qm:defect. If not, it's a defect.
The representation (e.g. summary/label) of qm:testplan/qm:relatedChangeRequest and qm:testplan/qm:workitem are different.
I've done some more testing and documented this in a defect (on Jazz).
WI 98275
Hi Marc,
Thanks for opening this defect.