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

How to post Test cases / Test suites from QM Rest Api

 Good morning,

I am trying to import some test suites with an xml file to QM. For the moment I am just able to import single test cases manually.
Is it possible to import Test suites (Multiple test cases at once)?
How should I structure the Rest api call to do the import via Rest Api?

0 votes



One answer

Permanent link
Have you reviewed the information on https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding, especially the links to ETM REST APIs?
You might also want to look at the OSLC Primer.

0 votes

Comments
I am currently trying this curl command to upload a test case via rest api

curl -X POST -k -H "Authorization: Basic cGFibG8uZ2FyaWpvOlBhbGFmb3g5" -H "oslc-core-version: 2.0" -H "Accept: application/rdf+xml" -H "Accept: application/xml" -i "https://doorsng.grupoantolin.com:9443/qm" -H "configuration-context: https://doorsng.grupoantolin.com:9443/qm/cm/stream/_UTSfAAdOEe2HeIm2C2mPgQ" -F "file=FILE.xml"  --cookie "cookie.txt" 


But I am getting error HTTP/1.1 302 Found

Your POST request is to "https://doorsng.grupoantolin.com:9443/qm". That looks like the context root of an ETM instance, and not the URI of a public REST service in ETM.

This means that you are redirected to a form based authentication. See https://rsjazz.wordpress.com/2021/10/15/elm-authentication/


Authentication can be a challenge. If you can use RESTClient in Firefox. That allows to access the web page, authenticate and then use RESTClient to GET/PUT/POST and the authentication is already done. It is also possible to use POSTMAN, but then you need an additional call for the Form based auth.

What is supported depends on the server setup. Basic Auth us only fallback for JAS.

https://jazz.net/wiki/bin/view/Deployment/CreateCustomScenarios#Using_Curl_Script shows how to use cURL and Form Based Auth.  

 

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,936

Question asked: Nov 14 '22, 9:51 a.m.

Question was seen: 1,175 times

Last updated: Nov 15 '22, 8:27 a.m.

Confirmation Cancel Confirm