It's all about the answers!

Ask a question

how to create a testcase?


george claud (12811) | asked Jul 06 '14, 11:57 a.m.
I am still stuck at how to create  a new testcase using C# in IBM CLM Quality Manager.

I read documentation that i can use :Rational Quality Manager Reportable REST API using a POST:

https://jazz.net/wiki/bin/view/Main/RqmApi#Create

Generated ID:

I tried to figure it out the fields i need in c# something like this:
            HttpWebRequest documentGet = (HttpWebRequest)WebRequest.Create(url);//<singleprojectFeedUrl> ?
            documentGet.Method = "POST";
            documentGet.ContentType = "application/xml ";//
            documentGet.Referer = "https://timo-pcvirtual:9433/qm";
            documentGet.Headers.Set("OSLC-Core-Version", "2.0");//do i need this ?
            documentGet.Timeout = 300000;
I guess after i send this  i need to get from response "Content-Location" header?
Its not clear also how to create an xml with the testcase info i want to send. I searched the net i found a schema of the document i need to send ... (ps i am an embedded sw developer so these things are pretty new for me -_-)
https://jazz.net/products/rational-quality-manager/api-doc-4.0.6/

Thank you very much for your help...I appreciate your time spent to help me with this :(

One answer



permanent link
Reshma Ratnani (1.1k1) | answered Jul 07 '14, 1:35 a.m.
JAZZ DEVELOPER
Hi George,

We have a opensource Java based API utility which you refer. You can have a look at the source code . Link for it is https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_API_Utility

The syntax for a sample testcase xml is as below

<?xml version="1.0" encoding="UTF-8"?>
<ns2:testcase xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://schema.ibm.com/vega/2008/" xmlns:ns3="http://purl.org/dc/elements/1.1/" xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns6="http://purl.org/dc/terms/" xmlns:ns7="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns10="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns12="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns13="http://open-services.net/ns/core#" xmlns:ns14="http://open-services.net/ns/qm#" xmlns:ns15="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns19="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns20="http://www.w3.org/1999/XSL/Transform">
    <ns3:title>Organizations can Apply</ns3:title>
  <ns3:description/> 
  <ns2:category value="Developer Test" term="Test Phase"/>
  <ns2:variables/>
  <ns2:testscript href="https://localhost:9444/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testscript/urn:com.ibm.rqm:testscript:17"/>
</ns2:testcase>

You can even create a testcase in RQM UI. Then do a GET of that testcase and get the syntax for testcase xml

Thanks

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.