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

Getting the error while saving the test script in RQM via c# coding

Hi,

I am getting the error while saving the test script in RQM via c# coding.

Could you please provide me the code to save test script in RQM via c#?

Thanks & Regards,

Milind Modi.

0 votes

Comments

Milind,

Can you provide additional information and details on what you are trying to attempt?

You have an HTTP client in C# and you are trying to create/update a Test Script? Is so, can you provide the syntax being used and the corresponding error message ?

Ara

Hi Ara,

I am using Rest API to work with Rational QM. I have the object of HTTPWebRequest and i am tring to fetch the Id which are going to create in WebResponse object using "GetResponse" Method but i am not getting that ID. So i am not able to create the Test Script in Rational via C# coding.

Could you please provide me any suggestion?

Regards,

Milind Modi.

 Milind,

What URI are you using in your GET request?
If you are looking to get the Test Script feed back you would use something like this:

Hi Ara,

I am trying to use REST API from C# code.

I am facing the issue while saving the test script from c#.

Please provide me correct way to save the Test Script in RQM.

I am using below part of code which is in other comment to save test script.

Continue above Que.

var host = "wegsfes29277clm3.accenture.com/qm/web/console/Sandbox-CLM-General(QM5.0)";

 var baseUrl = string.Format("https://{0}", host);

 var request3 = (HttpWebRequest)WebRequest.Create(string.Format(baseUrl + "/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/SANDBOX/testscript"));

 request3.CookieContainer = RationalHelper.ObjConnectionCookie;

 request3.Method = WebRequestMethods.Http.Post;

 request3.ContentType = "application/octet-stream";

 request3.Accept = "application/*";

byte[] bytes = ASCII.GetBytes(completeXMLTestScript);

 request3.ContentLength = bytes.Length;

 System.IO.Stream os = request3.GetRequestStream()os.Write(bytes, 0, bytes.Length); os.Close();

System.Net.WebResponse resp = request3.GetResponse()

string genratedID = resp.ResponseUri.Segments[5];


Now from here i am not getting the Id which is created in RQM before create the test script.



One answer

Permanent link
Your RQM Reportable REST API URL uses the /jazz context root but your RQM server uses the /qm context root.

See https://jazz.net/wiki/bin/view/Main/RqmApi#Update for the steps to update a test resource using the RQM Reportable REST API.

Note: Since the RQM Reportable REST API is a REST API and not bound to a specific HTTP client/language,
these types of questions are best asked in context of the RQM Reportable REST API.

0 votes

Comments

Hi Paul,

Thanks a lot for your response.

I am not able to create the GenerateID for the Test script which are going to create in RQM 4.0.6 via c# coding.  

can you please provide me the code to generate TestScript ID?

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

Question asked: Jun 16 '14, 6:27 a.m.

Question was seen: 3,606 times

Last updated: Jun 17 '14, 8:39 a.m.

Confirmation Cancel Confirm