It's all about the answers!

Ask a question

Export specific testresources from RQM with it's ID using REST API.


Sreenisha S (13158) | asked Oct 29 '13, 9:04 a.m.

Hi,

I am trying to export a single testcase using rest api.

When i gave the following URL it gave a feed containing all the Testcase details:

https://my-server:port-number/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/My-Project-area/testcase?fields=feed/entry/content/testcase/

But when i gave

https://my-server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/My-Project/testcase/urn:com.ibm.rqm:testcase:846?fields=feed/entry/content/testcase/*

It is not giving me the feed kind of output. it is navigating me to the view testcase screen in RQM.

Note: If i am getting a feed that contains only one testcase, i could save it as an XML doc.

Accepted answer


permanent link
Sunil Kumar R (1.1k13044) | answered Oct 31 '13, 3:32 a.m.
JAZZ DEVELOPER
I am out of ideas; you could contact IBM Rational Client Support for further assistance on this.
this will give you an opportunity to discuss the specifics of this issue and the solution required..

Best Regards, Sunil
Sreenisha S selected this answer as the correct answer

Comments
1
Sreenisha S commented Nov 06 '13, 5:17 a.m.

Hi,
I got it working. There were some network issue. After resolving that, i tried with the above code. Now it's working fine. Thanks for the answer.

3 other answers



permanent link
Sunil Kumar R (1.1k13044) | answered Oct 29 '13, 9:12 a.m.
JAZZ DEVELOPER
 Hello Sreenisha, you could simply download the artifacts using the RQM URL Utility (available for all versions of RQM)..

Here is a sample command  to download TestCase with id 209 to XML..

java -jar RQMUrlUtility.jar -command GET -user admin -password admin -filepath C:\\testCase_209.xml -url https://clm:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/testProjectofCLM403+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:209

Best Regards, Sunil

Comments
Sreenisha S commented Oct 30 '13, 5:43 a.m. | edited Oct 30 '13, 5:44 a.m.

I have tried with the above approach.

But it is not creating the xml file in the path specified. Instead it is giving the following error:...RQMUrlUtility: Connected to https://My-server:Port using project"xxxxx"
Oct 30, 2013 2:11:39 PM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry...INFO: I/O exception (java.net.ConnectException) caught when processing request:Connection timed out: connect
Oct 30, 2013 2:11:39 PM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry..INFO: Retrying request Oct 30, 2013 2:12:00 PM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: Retrying request...Oct 30, 2013 2:12:21 PM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry..INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect...Oct 30, 2013 2:12:21 PM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry INFO: Retrying request...RQMUrlUtility: Cannot authenticate to server java.net.ConnectException: Connection timed out: connect
Can anybody help me to resolve this?


permanent link
Sunil Kumar R (1.1k13044) | answered Oct 30 '13, 8:04 a.m.
JAZZ DEVELOPER
edited Oct 30 '13, 8:22 a.m.
Hello Sreenisha, what the error means is that the arguments which you have passed is wrong..
I am able to replicate the error with wrong user id and password, ofcourse with a different exception.
The error that you see could be indicating connection issues from the RQMUrlUtility machine to the RQM server..

Best Regards, Sunil


Comments
Sreenisha S commented Oct 30 '13, 9:43 a.m.

Hi,

This is the command i am using:

java -jar RQMUrlUtility.jar -command GET -user abc -password xyz -filepath d:\\RQMAssetsFolder\\testcasesree1.xml -url https://My-server:port/qm/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project-alias/testcase/urn:com.ibm.rqm:testcase:846

Note:

1. Using the username and password, i am able to login.

2. Using the URL, i could navigate to the particular testcase

Really clueless.

The username


permanent link
Sunil Kumar R (1.1k13044) | answered Oct 30 '13, 9:49 a.m.
JAZZ DEVELOPER
edited Oct 30 '13, 9:50 a.m.
Hello Sreenisha, Your url has extra string "secure"
https://My-server:port/qm/secure/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project-alias/testcase/urn:com.ibm.rqm:testcase:846

That is not a part of the REST URL!

Best Regards, Sunil

Comments
Sreenisha S commented Oct 30 '13, 11:52 p.m.

Hi,

Thanks for the response.This is also not working.

D:\RQM\RQM-Extras-RQMUrlUtil-3.0.1>java -jar RQMUrlUtility.jar -command GET -user abc -password password -filepath d:\\RQMAssetsFolder\\testcasesree1.xml -url https://Myserver:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project-alias/testcase/urn:com.ibm.rqm:testcase:846 

INFO:I/O exception (java.net.ConnectException) caught when processing request:Connection timed out: connect Oct 31,20139:10:44AMorg.apache.commons.httpclient.HttpMethodDirectorexecute WithRetry
INFO:Retrying request

INFO:I/O exception (java.net.ConnectException) caught when processing request:Connection timed out: connect Oct 31,20139:11:27AM org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO:Retrying request
RQMUrlUtility:Cannot authenticate to server java.net.ConnectException: Connection timed out:connect

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.