RQM REST API
2 answers
You need to give more details for others to help you. I have no problems with creating a Test Script using a REST client in Chrome. The basic steps are as follows.
1. Prepare the XML content to upload/post.
2. Send a POST request to https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript along with the XML content.
3. If successful, an HTTP 201 (created) will be returned, along with a "slug Id" in the "Content-Location" response header.
4. Append the "slug Id" to the Test Script resource URI and send a GET request - the newly created Test Script should be returned.
https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript/slug__aHW1QE6xEeSO2Z-9nmiDRA
1. Prepare the XML content to upload/post.
2. Send a POST request to https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript along with the XML content.
3. If successful, an HTTP 201 (created) will be returned, along with a "slug Id" in the "Content-Location" response header.
4. Append the "slug Id" to the Test Script resource URI and send a GET request - the newly created Test Script should be returned.
https://<server>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testscript/slug__aHW1QE6xEeSO2Z-9nmiDRA
Comments
Hi Donald,
Thanks for your quick response.
Actually I am successfully able to create Test Cases using REST API's and even Test Scripts of type manual using the REST API's. My only trouble is while creating Test Scripts of type Command Line Prompt using POST command.
sorry, I am not able to add the screenshot of the response.
Surely you mean "Command Line" type, not "Command Line Prompt"? I actually missed this point originally. To create a test script of the "Command Line" type, you need to use the "remotescript" resource, not "testscript" resource. I assumed that you took the template "like for like" but apparently that was not the case. I have no problems with creating such test scripts using REST API following the same steps mentioned above.
Hello ,
This is how I tried and I also faced the same issue , no slug id has been created , Can you point out where I am going wrong this ?
cloudadmin@gfwa509:~$ vi /home/cloudadmin/inout.xml
cloudadmin@gfwa509:~$ /usr/lib/jvm/java-8-oracle/bin/java -Dcom.ibm.team.repository.transport.client.protocol="TLSv1.2" -jar /home/cloudadmin/RQMUrlUtility/RQMUrlUtility.jar -command POST -user uchitran@in.ibm.com -password xxx@1234 -filepath '/home/cloudadmin/inout.xml' -cookiePolicy BROWSER_COMPATIBILITY -url https://jazz01.rchland.ibm.com:13443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testcase
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<<<----- [ RQMUrlUtility ] ---->>>>>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RQMUrlUtility: Connected to https://jazz01.rchland.ibm.com:13443 using project "Quality+Manager"
Attempting to create protocol context using system property: TLSv1.2
RQMUrlUtility: Calling [ HTTP POST ] method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 201
RQMUrlUtility: [ SUCCESS ] File : "/home/cloudadmin/inout.xml" successfully posted to URL : "https://jazz01.rchland.ibm.com:13443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/testcase "