Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ETM URL Utility

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

0 votes



4 answers

Permanent link

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

1 vote


Permanent link

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.

0 votes

Comments

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

 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.

0 votes


Permanent link

 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



0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Feb 24 '22, 3:53 a.m.

Question was seen: 1,688 times

Last updated: Feb 24 '22, 5:19 a.m.

Confirmation Cancel Confirm