Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get the look ups value for RQM test case using Rest API

How to get the look ups value for RQM test case using Rest API

I am referring this document for rest API.
Using the following Rest API i  am getting the fields meta of all schema including Test Case.

https://<host>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/schema/v2_0/qm.xsd


I wanted to fetch the look up values for the State, Priority , Template, Trigger,  as well Test Activity (Activity) etc.
Even wanted to fetch look up values for each category type.

Kindly provide me the Rest Request to be used in order to fetch all above mentioned Fields's look ups for RQM Test Case.

 Also how to fetch the custom attributes meta using the Rest Request above field meta request not giving custom field meta of Test Case.


Regards,
Ajay


0 votes

Comments

Hi

 Kindly provide solution to requested query

Thanks

What exactly is a "look up value"?



2 answers

Permanent link

Hi

Kindly provide solution to requested query.


0 votes


Permanent link

Hi,


From my point of view the chance to get this information using the REST API isn't that great. I propose to get the information using OSLC. In OSLC do you get a Resource Shape for each Artifact Creation Factory. 

To get an overview on how this could work the Firefox REST Client can help you quite good.

Start with the server's rootservice document (https://your.server/qm/rootservices) and find enclosed the Quality Management OSLC Service provider catalog, 

<!-- Quality Management services catalog -->
<oslc_qm:qmServiceProviders rdf:resource="https://your.server/qm/oslc_qm/catalog"/>

This should give you a list of all project areas defined in RQM. Find your qm project inside the list and query for the service provider catalog related to your project. In RQM this has usually the format:


Using this URL you get the service provider document which contains the creation factory urls for each RQM artifact. Below do you find an exammple for he Test Case creation factory.

<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title>Default creation factory for TestCase</dcterms:title>
<oslc:creation rdf:resource="https://your.server/qm/oslc_qm/contexts/_ngtRACF5EeaPoKjHlJu0-A/resources/com.ibm.rqm.planning.VersionedTestCase"/>
<oslc:resourceShape rdf:resource="https://your.serve/qm/oslc_qm/contexts/_ngtRACF5EeaPoKjHlJu0-A/shape/creation/com.ibm.rqm.planning.VersionedTestCase"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/qm#TestCase"/>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>
The creation factory itself contains a url to the so-called resource shape which is a kind of blueprint for the artifact. The link to the resource shape contains among other things also the allowed values for the enumerations in RQM.

<oslc:Property>
<oslc:range rdf:resource="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority"/>
<oslc:representation rdf:resource="http://open-services.net/ns/core#Reference"/>
<oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-one"/>
<oslc:allowedValue>
<rqm_process:Priority rdf:about="https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_ngtRACF5EeaPoKjHlJu0-A/priority/literal.priority.130">
<owl:sameAs rdf:resource="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.130"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">High</dcterms:title>
<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">literal.priority.130</dcterms:identifier>
</rqm_process:Priority>
</oslc:allowedValue>
<oslc:valueShape rdf:resource="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Has Priority</dcterms:title>
<oslc:allowedValue>
<rqm_process:Priority rdf:about="https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/process-info/_ngtRACF5EeaPoKjHlJu0-A/priority/literal.priority.110">
<owl:sameAs rdf:resource="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/Priority/literal.priority.110"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Low</dcterms:title>
<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">literal.priority.110</dcterms:identifier>
</rqm_process:Priority>
</oslc:allowedValue>
<oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:readOnly>
<oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">hasPriority</oslc:name>
<dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">The priority of the resource.</dcterms:description>
<oslc:isMemberProperty rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:isMemberProperty>
<oslc:hidden rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:hidden>
<oslc:allowedValue>
If you need more information on that I propose to switch to Stephane Leroy's Blog with much more information on that.

If you're looking for a good development framework I propose to use Eclipse Lyo, which supports quite well in getting all that stuff.

0 votes

Comments

Hi Matthias,

Thanks for the response.
We have checked the OSLC API to get fields meta and look up values.

But we are facing few issues using OSLC API. following are those. Kindly help us to resolve them.

1) Using OSLC we are getting look up for the Priority, Status etc. but we are not getting look up values for Test Case Activity and Trigger Field.

2) Using OSLC we are also not getting fields information of each rich text type field of test case.
as per RQM UI rich text fields are, Pre-Condition,Post-Condition, Test Case design, Test Case Scope , Notes etc.
But using OSLC we are not getting all these fields meta for test case.

 Click Here to check the Request of Test Case Meta and Rich Text Section response.

 Kindly help us to resolve above two query.
 
 Thanks in advance

Hi Ajay.

Back from vacation I find the time to comment on your Questions.

First of all, is it right, that you'd like to create a test case using REST or OSLC?

But now my comments on your answer:

1) What do you mean with Trigger or Activity Field. Is this a custom or a built-in attribute.  If it's a built-in I have to apologize but we never used them before so they are unknown to me.

2) When you query for an existing Test Case using the Firefox Rest Client you'll find the rich text fields as well. Search for the tag <rqm_qm:richTextSection> in the Result.

So if you'd like to create a Test Case you simply need to adapt the XML and add the content for each Rich-Text section. If you use Lyo this should be possible using the ExtendedProperties property of the Test Case class.

Kind regards
Matthias

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 11 '17, 5:11 a.m.

Question was seen: 2,843 times

Last updated: Aug 08 '17, 4:12 p.m.

Confirmation Cancel Confirm