How to get XML fource from RQMUrlUtility for Custom Section unique ID using RQM Importer
The command I'm using is:
java -jar RQMUrlUtility.jar -user <MyID> -password <MyPSWD> -command GET -filepath <path>/output.txt -url <URL of specific test case>
I'm looking for something like the following in the XML response:
< ns2:section content="" name="MyCustomTPsectionForDemo" id="com.ibm.rqm.planning.editor.section.dynamicSection_1379687368053" description="Created this section for a demo"/ > The output that I receive is the same as if I were to "view page source". It doesn't provide the XML source.
Can this be done with RQMUrlUtility? if so how?
Thanks,
Karen
Accepted answer
https://jazz.net/forum/questions/176445/rqmexcelimporter-importing-custom-section-in-test-plan
Note that the custom section appears in only the test artifacts that you have added custom sections to. So make sure the test case that you queried is the same one you have already added a custom section.
Also, if you want to add custom sections when creating the test case, you don't need to find the section Id beforehand - you can use any values.
Comments
Hi Donald, I have read the post that you mentioned. The "custom sections" are part of my test case template that I created. They are not default fields from RQM.
My biggest issue is actually getting the "dynamicSection_<uuid>" in the XML response for RQMUrlUtility. I cannot get that to work. I keep getting an error.
I believe my REST command may not be correct but I'm not sure what the issue is.
Here are the different ways I have tried it.
The REST command I'm using is as follows:
java -jar RQMUrlUtility.jar -user <MyID> -password <MyPassword> -command REST -filepath <PATH/output.txt> -url <https://HOST:9443/qm/web/console/AIMM%20S2%20Lifecycle%20Project%20for%20Requirements,%20CCM,%20SW%20Dev%20and%20QA%20%28Quality%20Management%29#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewTestCase&id=2>
I keep getting the following error when running the RQMUrlUtility:
Default cookie policy RFC_2109 is used.
RQMUrlUtility: connections to <HOST> using <PROJECT>
Attempting to create SSL_TLS contect
java.security.NoSuchAlgorithmException: SSL_TLS SSLContext not available
Unable to create SSL_TLS context, trying SSLv3
RQMUrlUtility: ** Invalid HTTP Request *
Disconnecting from the IBM Rational Quality Manager server.
/subAction' is not recognized as an internal or external command, operable program or batch file.
'id' is not recognized as an internal or external command, operable program or batch file.
here's another way I tried it based on other searches and posts I've done:
java -jar RQMUrlUtility.jar -user <MyID> -password <My Password> -command REST -filepath <PATH/output.txt> -url https://HOST:9443/qm/web/console/AIMM%20S2%20Lifecycle%20Project%20for%20Requirements,%20CCM,%20SW%20Dev%20and%20QA%20%28Quality%20Management%29/testcase/urn=com.ibm.rqm.planning.TestCase=57
This is the response I get:
Default cookie policy RFC_2109 is used.
RQMUrlUtility: connections to <HOST> using <PROJECT>
Attempting to create SSL_TLS contect
java.security.NoSuchAlgorithmException: SSL_TLS SSLContext not available
Unable to create SSL_TLS context, trying SSLv3
RQMUrlUtility: ** Invalid HTTP Request *
Disconnecting from the IBM Rational Quality Manager server.
The one thing I notice in each of these errors is that the project displayed in the double quotes doesn't show the full HOST name.
Also to note, I can get a GET command to work and provide me output however it is not XML output. The command I used was:
java -jar RQMUrlUtility.jar -user <MyID> -password <MyPassword> -command GET -filepath <PATH\output.txt> -url https://HOST:9443/qm/web/console/AIMM%20S2%20Lifecycle%20Project%20for%20Requirements,%20CCM,%20SW%20Dev%20and%20QA%20%28Quality%20Management%29/testcase/urn=com.ibm.rqm.planning.TestCase=57
The response back:
Default cookie policy RFC_2109 is used.
RQMUrlUtility: Connected to https://HOST:9443 using project "PartialHOST:9443"
Attempting to create SSL_TLS context
java.security.NoSuchAlgorithmException: SSL_TLS SSLContext not available
Unable to create SSL_TLS context, trying SSLv3
RQMUrlUtility: Calling [ HTTP GET ] method to retrieve XML from a specified URL
RQMUrlUtility: Server Response code: 200
RQMUrlUtility: [ SUCCESS ] XML string retrieved from URL : "https://HOST:94
43/qm/web/console/AIMM+S2+Lifecycle+Project+for+Requirements%2c+CCM%2c+SW+Dev+an
d+QA+%28Quality+Management%29/testcase/urn=com.ibm.rqm.planning.TestCase=57 " is written to file located at -: " <PATH\output.txt> "
Disconnecting from the IBM Rational Quality Manager server.
This results in the same HTML output.
Ah...you need to use the reportable REST API URL, not the same URL that you use in a browser. Your URL should look like:
https://HOST:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/AIMM+S2+Lifecycle+Project+for+Requirements%2c+CCM%2c+SW+Dev+and+QA+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:57
For more details, see
https://jazz.net/wiki/bin/view/Main/RqmApi
2 other answers
For others trying to figure this out....here's the command I used:
java -jar RQMUrlUtility.jar -user <MyID> -password <MyPassword> -command GET -filepath <PATH> -url https://<HOSTNAME>:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/AIMM+S2+Lifecycle+Project+for+Requirements%2c+CCM%2c+SW+Dev+and+QA+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:57
Output received in cmd.exe window:
Default cookie policy RFC_2109 is used.
RQMUrlUtility: Connected to https://<HOSTNAME>:9443 using project "AIMM+S2+Lifecy
cle+Project+for+Requirements%2c+CCM%2c+SW+Dev+and+QA+%28Quality+Management%29"
Attempting to create SSL_TLS context
java.security.NoSuchAlgorithmException: SSL_TLS SSLContext not available
Unable to create SSL_TLS context, trying SSLv3
RQMUrlUtility: Calling [ HTTP GET ] method to retrieve XML from a specified URL
RQMUrlUtility: Server Response code: 200
RQMUrlUtility: [ SUCCESS ] XML string retrieved from URL : "https://<HOSTNAME>:94
43/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/AIMM
+S2+Lifecycle+Project+for+Requirements%2c+CCM%2c+SW+Dev+and+QA+%28Quality+Manage
ment%29/testcase/urn:com.ibm.rqm:testcase:57 " is written to file located at -:
" <PATH> "
Disconnecting from the IBM Rational Quality Manager server.
Line I was looking for:
><com.ibm.rqm.planning.editor.section.dynamicSection_1446479924943 xmlns="http://jazz.net/xmlns/alm/qm/v0.1/" extensionDisplayName="Outline">