It's all about the answers!

Ask a question

How to get the test plan OSLC url


Marc van Lint (852128) | asked Oct 24 '13, 7:00 a.m.
JAZZ DEVELOPER
I'm creating a RPE template to 'print' a test plan. Now I want to include the related defects. Aparently there is no direct link from the test plan to the defects (as far as I know now) which we can use. A query on the defects is the only way. In the defect I found the OSLC back-link. So to query I need have the OSLC link of a testplan in RPE. RQM does not provide such a URI.

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



permanent link
Sunil Kumar R (1.1k13044) | answered Oct 24 '13, 8:06 a.m.
JAZZ DEVELOPER
edited Oct 24 '13, 8:06 a.m.
 Hello! Not sure if this answers..I tried the steps below to get to the 2nd URL you have..

1. Go to.. 
https://localhost:9443/qm/oslc_qm/catalog

2. Note down the value for the project area under teh oslc discovery path..
eg: for Project area "JKE Banking (Quality Management)" it is "_fVeFIsIMEeK7HcjfoUeAvg"

<oslc_disc:ServiceProvider>
<dc:title>JKE Banking (Quality Management)</dc:title>
<oslc_disc:details rdf:resource="https://clm.jkebanking.net:9443/qm/process/project-areas/_fVeFIsIMEeK7HcjfoUeAvg"/>
<oslc_disc:services rdf:reso...

3. Then use the "versionedTestPlan" URL as below to get both the type of URL's you showed!

https://localhost:9443/qm/oslc_qm/contexts/_fVeFIsIMEeK7HcjfoUeAvg/resources/com.ibm.rqm.planning.VersionedTestPlan

Best Regards, Sunil


Comments
Marc van Lint commented Oct 24 '13, 2:53 p.m.
JAZZ DEVELOPER

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.


Paul Slauenwhite commented Oct 24 '13, 3:14 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Marc, you MUST use the following header:

OSLC-Core-Version = 2.0


Marc van Lint commented Oct 25 '13, 8:55 a.m.
JAZZ DEVELOPER

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.


permanent link
Paul Slauenwhite (8.4k12) | answered Oct 24 '13, 8:09 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Marc,

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
Marc van Lint commented Oct 24 '13, 1:16 p.m.
JAZZ DEVELOPER

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.


Paul Slauenwhite commented Oct 24 '13, 1:45 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

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.


Marc van Lint commented Oct 25 '13, 8:16 a.m.
JAZZ DEVELOPER

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


Paul Slauenwhite commented Oct 25 '13, 9:21 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

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.


Marc van Lint commented Oct 27 '13, 7:26 a.m.
JAZZ DEVELOPER

I've done some more testing and documented this in a defect (on Jazz).
WI 98275


Paul Slauenwhite commented Oct 28 '13, 6:38 a.m. | edited Oct 31 '13, 10:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hi Marc,

Thanks for opening this defect.

showing 5 of 6 show 1 more comments

Your answer


Register or to post 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.