Best tool to query RQM Testcases
If this question posts twice, Im sorry. First post seemed to go away.
I need to be able to query RQM for test cases via a commandline tool. We have RQM 6.0.6.1
I have tried the RQMURLUtility. It was successful, but it could only retrieve 50 artifacts. I kno wwe can ajdust that on the server, but we have 1000s of artifacts. I did not see a method to pull the next page from the feed with this tool.
I have tried the RQMAPIUtility, but the version I have I am having issues with. One thing I noticed is the RQMAPIUtility is not available on the 6.0.6.1 download page here -> https://jazz.net/downloads/rational-quality-manager/releases/6.0.6.1?p=allDownloads but is is available here -> https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_API_Utility)
Maybe I have a version issue or syntax/url wrong as im getting "Not Implemented" errors.
Maybe someone sees the mistake I made.
C:\Users\xxx\Downloads\RQMAPIUtility>java -Dcom.ibm.team.repository.transport.client.protocol="TLSv1.2" -jar RQMAPIUtility.jar -c=readAllTestcaseResources -qm="https://myserv.ibm.com:9443/qm" -u="user" -pw="psswd" -r="output.out" -o
Configuring the ETM API Utility.
Connecting to the IBM Engineering Test Management server.
Starting the ETM API Utility.
Starting command 'readAllTestcaseResources' in project area 'FlashCopy+Manager+Unix+Test'.
Running command 'readAllTestcaseResources' in project area 'FlashCopy+Manager+Unix+Test'.
Mar 17, 2021 7:35:16 AM com.ibm.rqm.api.internal.util.LogUtils logError
SEVERE: java.io.IOException: Error reading feed 'https://myserv.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/FlashCopy+Manager+Unix+Test/Testcase?abbreviate=false&calmlinks=true' for artifact type 'Testcase'.
java.io.IOException: Error reading feed 'https://myserv.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/FlashCopy+Manager+Unix+Test/Testcase?abbreviate=false&calmlinks=true' for artifact type 'Testcase'.
at com.ibm.rqm.api.internal.util.FeedReader.getEntries(FeedReader.java:237)
at com.ibm.rqm.api.internal.util.FeedReader.getIds(FeedReader.java:96)
at com.ibm.rqm.api.internal.util.FeedReader.getIds(FeedReader.java:89)
at com.ibm.rqm.api.internal.APIUtilities.run(APIUtilities.java:224)
at com.ibm.rqm.api.APIUtility.main(APIUtility.java:458)
Caused by: HttpClientException executing method 'get(https://myserv.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/FlashCopy+Manager+Unix+Test/Testcase?abbreviate=false&calmlinks=true)' (return code = 501): Error 501: SRVE0295E: Error reported: 501
at com.ibm.rqm.api.internal.client.JazzHttpClient.get(JazzHttpClient.java:373)
at com.ibm.rqm.api.internal.util.FeedReader.getEntries(FeedReader.java:125)
... 4 more
ETM API Utility has terminated due to an error.
Disconnecting from the IBM Engineering Test Management server.
Lastly I started to go at the REST API with curl, but so far have not figured out the correct syntax. Figured I woudl post here before I got to far down that road.
|
2 answers
Following up ......
Thanks to this post -> https://jazz.net/forum/questions/269025/how-do-i-use-curl-to-work-with-the-rqm-api
Im not 100% sure what all the syntax does, but I can use curl to extract the testcases with the below syntax that saves my creds in a cookie and then execute the query against the API. I can still only get 50 artifacts. Will follow up with how to get them all and hopefully how to filter the GET request
curl -k --location --cookie jar.txt --cookie-jar jar.txt "https://myserver.ibm.com:9443/qm/j_security_check" --header "accept: /" --header "oslc-core-version: 2.0" --header "Content-Type: application/x-www-form-urlencoded" --header "Content-Type: application/x-www-form-urlencoded" --data j_username="user" --data j_password="password"
curl -k --cookie jar.txt --location --request GET "https://myserver.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/FlashCopy+Manager+Unix+Test/testcase" --header "Accept: application/xml" --data "myfile.xml"
|
Following up ......
Thanks to this post -> https://jazz.net/forum/questions/269025/how-do-i-use-curl-to-work-with-the-rqm-api
Im not 100% sure what all the syntax does, but I can use curl to extract the testcases with the below syntax that saves my creds in a cookie and then execute the query against the API. I can still only get 50 artifacts. Will follow up with how to get them all and hopefully how to filter the GET request
curl -k --location --cookie jar.txt --cookie-jar jar.txt "https://myserver.ibm.com:9443/qm/j_security_check" --header "accept: /" --header "oslc-core-version: 2.0" --header "Content-Type: application/x-www-form-urlencoded" --header "Content-Type: application/x-www-form-urlencoded" --data j_username="user" --data j_password="password"
curl -k --cookie jar.txt --location --request GET "https://myserver.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/FlashCopy+Manager+Unix+Test/testcase" --header "Accept: application/xml" --data "myfile.xml"
|
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.