It's all about the answers!

Ask a question

ETM URL Utility


Andy Lapping (6836) | asked Feb 24 '22, 3:53 a.m.
edited Feb 24 '22, 4:12 a.m.

Has anyone actually gotten this to work (702 iFix10) ? 

I tried a basic example - created two projects ETM1 and ETM2 with a single test plan in ETM1

I downloaded the test plan successfully with a GET but I could not PUT it to the other project
Everything I've tried results in a server response of 400

java -jar RQMUrlUtility.jar -command GET -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM1/testplan/urn:com.ibm.rqm:testplan:35

java -jar RQMUrlUtility.jar -command PUT -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM2/testplan/urn:com.ibm.rqm:testplan:35

I tried TLS1.2

java -Dcom.ibm.team.repository.transport.client.protocol=TLSv1.2 -jar RQMUrlUtility.jar -command PUT -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM2/testplan/urn:com.ibm.rqm:testplan:35

Default cookie policy RFC_2109 is used.
Connected to https://ibmjazz:9443 using project "ETM2"
Attempting to create protocol context using system property: TLSv1.2
Calling [ HTTP PUT ] method to upload XML from a specified file to URL
Server Response code: 400
Disconnecting from the IBM Engineering Test Management server.



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<<<----- [ ETM URL Utility ] ---->>>>>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Default cookie policy RFC_2109 is used.
Connected to https://ibmjazz:9443 using project "ETM2"
Attempting to create SSL_TLS context
java.security.NoSuchAlgorithmException: SSL_TLS SSLContext not available
Unable to create SSL_TLS context, trying TLS
Calling [ HTTP PUT ] method to upload XML from a specified file to URL
Server Response code: 400
Disconnecting from the IBM Engineering Test Management server.

I also tried a POST with the same result
I also gave Everyone permissions to do Everything (just in case it was a permissions error)

I'm out of options

4 answers



permanent link
Andy Lapping (6836) | answered Feb 24 '22, 5:11 a.m.
edited Feb 24 '22, 5:19 a.m.

OK so these two commands will read all test plans from ETM2 and add them to ETM1 - hope this helps someone else !


Read:
java -jar RQMUrlUtility.jar -Dcom.ibm.team.repository.transport.client.protocol=TLSv1.2 -command GET -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM2/testplan?abbreviate=false

Write:
java -jar RQMUrlUtility.jar -Dcom.ibm.team.repository.transport.client.protocol=TLSv1.2 -command POST -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM1/testplan


permanent link
David Honey (1.4k17) | answered Feb 24 '22, 4:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Andy, the errors you're seeing look like TLS related errors. Are you using the JRE shipped with ETM, or a later JRE?
If you are using a later JRE, that might be the cause.


Comments
Andy Lapping commented Feb 24 '22, 4:14 a.m. | edited Feb 24 '22, 4:17 a.m.

Hi David - using java version "1.8.0_221"

I hard coded the command to use the Java shipped with ETM - still got a 400 but a slightly different message afterwards:

Default cookie policy RFC_2109 is used.
Connected to https://ibmjazz:9443 using project "ETM2"
Attempting to create protocol context using system property: TLSv1.2
Feb 24, 2022 9:16:01 AM org.apache.commons.httpclient.HttpMethodDirector isRedir
ectNeeded
INFO: Redirect requested but followRedirects is disabled
Calling [ HTTP POST ] method to upload XML from a specified file to URL
Server Response code: 400
Disconnecting from the IBM Engineering Test Management server.
Feb 24, 2022 9:16:02 AM org.apache.commons.httpclient.HttpMethodBase getResponse
Body
WARNING: Going to buffer response body of large or unknown size. Using getRespon
seBodyAsStream instead is recommended.


permanent link
Andy Lapping (6836) | answered Feb 24 '22, 4:22 a.m.

 More on this:


PUTing a resource back to its original location works just fine (I changed the title in the XML and pushed it back)
POSTing it to a new project does not

java -Dcom.ibm.team.repository.transport.client.protocol=TLSv1.2 -jar RQMUrlUtility.jar -command PUT -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM1/testplan/urn:com.ibm.rqm:testplan:35

Default cookie policy RFC_2109 is used.
Connected to https://ibmjazz:9443 using project "ETM1"
Attempting to create protocol context using system property: TLSv1.2
Calling [ HTTP PUT ] method to upload XML from a specified file to URL
Server Response code: 200
[ SUCCESS ] XML string from file : "c:/work/get.xml" written to URL : "https://i
bmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resou
rces/ETM1/testplan/urn:com.ibm.rqm:testplan:35 "
Disconnecting from the IBM Engineering Test Management server.


permanent link
Andy Lapping (6836) | answered Feb 24 '22, 5:00 a.m.

 So I've made some progress on this

I can GET a single resource and then POST that to a new project (the key is not to include the id of the new test plan in the POST) - should have paid more attention to the docs on that one !

java -jar RQMUrlUtility.jar -command GET -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM2/testplan/urn:com.ibm.rqm:testplan:44

java -jar RQMUrlUtility.jar -command POST -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM1/testplan

However Bulk download / upload which is what I was hoping for still throws 400:

java -jar RQMUrlUtility.jar -command GET -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM2/testplan
java -jar RQMUrlUtility.jar -command POST -user ibm -password ibm -filepath c:/work/get.xml -url https://ibmjazz:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ETM1/testplan



Your answer


Register or to post your answer.