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. |
One answer
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.
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,
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.