It's all about the answers!

Ask a question

Problem generating multiple test cases using RQM Utility


Eric Briere (411213) | asked Oct 07 '13, 3:16 p.m.
Using the RQMUtility, i am trying to create multiple test cases and then add them to a new test suite.

The problem I have right now is that all the new test cases overwrite each other.  As if the latest Test Case current webID does not get incremented correctly.

Is there a required "commit" or do i need to add a long pause between each update ?

I am using version 4.0.1

Accepted answer


permanent link
Antoinette Iacobo (650712) | answered Oct 07 '13, 6:12 p.m.
Eric,

Are you able to generate your own unique IDs?  If so, what you could do is just create the test case with an external ID.  Again, from that link:  "...A unique ID provided by the user when creating a new resource with a PUT...".

I just tried it with Poster by adding my ID to the URL, e.g. .../urn:com.ibm.rqm:testcase/myID1.  The response was 201, created.  I can keep adding new ones with /myID2, /myID3, etc., even with the same XML body, new TCs are created.

Toni
Eric Briere selected this answer as the correct answer

Comments
Eric Briere commented Oct 08 '13, 11:22 a.m.

Thank you very much.  To make it easier I just used a combination of the current time in milliseconds and a random number to generate a temporary ID.

2 other answers



permanent link
Ara Masrof (3.2k15) | answered Oct 07 '13, 4:07 p.m.
JAZZ DEVELOPER
 Eric,
Which specific RQM utility are you using to create the assets with (i.e. The URL utility, the Excel/Word utility...etc)?

Ara


Comments
Eric Briere commented Oct 07 '13, 5:09 p.m. | edited Oct 09 '13, 3:31 p.m.

I am using the java RQMUrlUtility:

Basically i try to create about 35 different test cases in a row, but only the 1st one gives me a 201 return code (new) the other 34 returns me a 200 return code (updated) which does not make sense because I am not specifying any WebID and I am uploading different XML files

Here is the trace (for the first 2 entries only):

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                  <<<<<----- [ RQMUrlUtility ] ---->>>>>
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

RQMUrlUtility: Connected to https://10.10.23.61:9443 using project "Archive+Dev+Playground"
RQMUrlUtility: Calling [ HTTP PUT ] method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 201
RQMUrlUtility: [ SUCCESS ] XML string from file : "C:\Users\benoitl\AppData\Local\Temp\RQM2579577557869613250.xml" written to URL : "https://10.10.23.61:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Archive+Dev+Playground/testcase/urn:com.ibm.rqm:testcase "
Disconnecting from the IBM Rational Quality Manager server.

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                  <<<<<----- [ RQMUrlUtility ] ---->>>>>
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

RQMUrlUtility: Connected to https://10.10.23.61:9443 using project "Archive+Dev+Playground"
RQMUrlUtility: Calling [ HTTP PUT ] method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 200
RQMUrlUtility: [ SUCCESS ] XML string from file : "C:\Users\benoitl\AppData\Local\Temp\RQM5576112222695598570.xml" written to URL : "https://10.10.23.61:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Archive+Dev+Playground/testcase/urn:com.ibm.rqm:testcase "
Disconnecting from the IBM Rational Quality Manager server.


permanent link
Antoinette Iacobo (650712) | answered Oct 07 '13, 4:46 p.m.
 Hi Eric,

How are you getting the ID of a newly created test case?  

Could you show the series of commands, URLs you are sending with the Utility and the response for each (200 or 201).  

Also take a look at this link: https://jazz.net/wiki/bin/view/Main/RqmApi#Types_of_IDs_in_RQM and you could create your own ID.  Then there should be no ambiguity on whether you are updating an existing resource or creating a new one.  

Comments
Eric Briere commented Oct 07 '13, 5:14 p.m. | edited Oct 09 '13, 3:32 p.m.

I retrieve the ID of the newly generated test cases by downloading the feed of all test cases, sorted by modified time (newest first) and looping in the entries until I find the 1st test case with the same Title.


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.