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

How to create Master test plan from Rest API in RQM?

 Need examples

0 votes

Comments

Please do not spam our forum with repeated questions and consider to provide more information than demonstrated here. Read: How should I ask a question in the Forum if I want to receive useful answers? 



One answer

Permanent link

 How to create test management artifacts.


As basics see 

Also see https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding for a comprehensive starting point.
You have at least two options: OSLC and the Reportable REST API.

In general see

For OSLC see

A good example about how to create and get using OSLC for EWM is here. 

There are very small differences to ETM. I will explain in a bit.

And check this super artifact. 

The differences to the EWM code is as follows:
There are creation factories and the related resource shapes for all ETM artifact types such as com.ibm.rqm.planning.VersionedTestCase. E.g.

ResourceType='http://jazz.net/ns/qm/rqm#TestData'
ResourceType='http://jazz.net/ns/qm/rqm#Keyword'
ResourceType='http://jazz.net/ns/qm/rqm#TestSuiteResult'
ResourceType='http://open-services.net/ns/qm#TestExecutionRecord'
ResourceType='http://jazz.net/ns/qm/rqm#TestSuite'
ResourceType='http://open-services.net/ns/qm#TestCase'
ResourceType='http://jazz.net/ns/qm/rqm#BuildRecord'
ResourceType='http://jazz.net/ns/qm/rqm#BuildDefinition'
ResourceType='http://jazz.net/ns/qm/rqm#TestSuiteExecutionRecord'
ResourceType='http://open-services.net/ns/qm#TestPlan'
ResourceType='http://open-services.net/ns/qm#TestScript'
ResourceType='http://open-services.net/ns/qm#TestResult'

Each of these resource types have a creation factory, resource shape etc. Like with EWM, you use the factory URI and do a POST to the factory to create an item.
The request below dies that. It provides the headers ETM seems to only support RDF XML. The request body has to provide the required information. The data below is the minimal data I found for a TestCase.



Request Headers:
Accept application/rdf+xml;charset=utf-8
Content-type application/rdf+xml;charset=utf-8
X-Jazz-CSRF-Prevent 0000d2li-MEAu1YhSaFAwfkYXG-:f8076ff7-caee-4e1a-867b-a755e5814f2f
OSLC-Core-Version 2.0

Body:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
   xmlns:dcterms="http://purl.org/dc/terms/"
   xmlns:rpm_qm="http://jazz.net/ns/qm/rqm#"
>
  <rdf:Description rdf:nodeID="N27262c468079441b9c92f40259d94b18">
    <dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Another Test</dcterms:description>
    <rdf:type rdf:resource="http://open-services.net/ns/qm#TestCase"/>
    <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Just a test</dcterms:title>
  </rdf:Description>
</rdf:RDF>

0 votes

Comments

Note that you also need to send a configuration if Configuration management is enabled. 

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
× 12,015

Question asked: Jan 31 '22, 4:58 a.m.

Question was seen: 1,250 times

Last updated: Mar 15 '22, 11:33 a.m.

Confirmation Cancel Confirm