It's all about the answers!

Ask a question

REST API to fetch all QM test artifacts in GC project


Swathi sheshadri (13111) | asked May 24 '22, 5:23 a.m.
Hello Team,

I am using below query to fetch all testcases from a project


1. Query for PA : SIP (QM)

2. Query for PA : ASIC (QM)

https://rb-alm-11-q2.de.bosch.com/qm/oslc_qm/contexts/_6Cf2BOCaEeuaurObCHGwiA/resources/com.ibm.rqm.planning.VersionedTestCase?oslc_config.context=_wcTdQOPMEeumuL1C5ZQDYQ


The response for (1) fetches all the test cases for the mentioned configurations but for (2) i do not get any test case information instead i get below response with 302 HTTPStatus. The project has over 1200 test cases.



<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rqm_auto="http://jazz.net/ns/auto/rqm#" xmlns:acp="http://jazz.net/ns/acp#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:acc="http://open-services.net/ns/core/acc#" xmlns:process="http://jazz.net/ns/process#" xmlns:dcterms="http://purl.org/dc/terms/"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:jrs="http://jazz.net/ns/jrs#" xmlns:oslc_auto="http://open-services.net/ns/auto#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bp="http://open-services.net/ns/basicProfile#"
  xmlns:project__6Cf2BOCaEeuaurObCHGwiA_testCase="https://rb-alm-11-q2.de.bosch.com/qm/oslc_qm/contexts/_6Cf2BOCaEeuaurObCHGwiA/shape/resource/com.ibm.rqm.planning.VersionedTestCase#" xmlns:cmx="http://open-services.net/ns/cm-x#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:rqm_lm="http://jazz.net/ns/qm/rqm/labmanagement#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rqm_process="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:oslc_config="http://open-services.net/ns/config#"
  xmlns:oslc_cm="http://open-services.net/ns/cm#" xmlns:rqm_qm="http://jazz.net/ns/qm/rqm#" xmlns:oslc_qm="http://open-services.net/ns/qm#" xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
  <rdf:Description rdf:about="https://rb-alm-11-q2.de.bosch.com/qm/oslc_qm/contexts/_6Cf2BOCaEeuaurObCHGwiA/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.paging=true&amp;rqm_qm.queryToken=_znruEttCEeyF2qHYztl8jQ&amp;oslc.pageSize=512&amp;rqm_qm.pageNum=0">
    <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">QM V2 Test Case Query Results</dcterms:title>
    <oslc:nextPage rdf:resource="https://rb-alm-11-q2.de.bosch.com/qm/oslc_qm/contexts/_6Cf2BOCaEeuaurObCHGwiA/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.paging=true&amp;rqm_qm.queryToken=_znruEttCEeyF2qHYztl8jQ&amp;oslc.pageSize=512&amp;rqm_qm.pageNum=1"
    />
    <oslc:totalCount rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">779</oslc:totalCount>
    <bp:containerSortPredicates rdf:datatype="http://www.w3.org/2001/XMLSchema#string">rqm_qm:orderIndex</bp:containerSortPredicates>
    <dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Results of a QM V2 Test Case query.</dcterms:description>
    <rdf:type rdf:resource="http://open-services.net/ns/core#ResponseInfo" />
  </rdf:Description>
  <rdf:Description rdf:about="https://rb-alm-11-q2.de.bosch.com/qm/oslc_qm/contexts/_6Cf2BOCaEeuaurObCHGwiA/resources/com.ibm.rqm.planning.VersionedTestCase">
    <rdf:type rdf:resource="http://open-services.net/ns/qm#TestCaseQuery" />
  </rdf:Description>
</rdf:RDF>


Please let me know how to fetch information for 1200 test case with query (2)

<style> @font-face {font-family:&amp;quot;Cambria Math&amp;quot;; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0in; margin-right:0in; margin-bottom:8.0pt; margin-left:0in; line-height:107%; font-size:11.0pt; font-family:&amp;quot;Calibri&amp;quot;,sans-serif;}.MsoChpDefault {font-family:&amp;quot;Calibri&amp;quot;,sans-serif;}.MsoPapDefault {margin-bottom:8.0pt; line-height:107%;}div.WordSection1 {page:WordSection1;} </style>

One answer



permanent link
David Honey (1.8k17) | answered May 24 '22, 5:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I don't know the answer to your specific question. However, an observation about the oslc_config.context parameter. This parameter is defined by the OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/oslc-config-mgt.html. As described in section 4 of https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#configcontext:

Syntax of the query string for configuration context:

?oslc_config.context=uri_ref_esc
        

The uri_ref_esc is an angle bracket-delimited URI reference in which > and \ are \-escaped, as defined in [OSLCCore3]

This applies to operations including a GET of a concept resource, and a GET on an OSLC query base.


Comments
Swathi sheshadri commented May 24 '22, 12:30 p.m.

After i added a parameter

&oslc.pageSize=Count was able to fetch all the details of test case in a project.

I guess there is a limit set in default query which only displays count instead of additional information.

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.