IBM Support

How to create a test case and assign a value of a custom attribute of Date/Time type with RQMUrlUtility in Rational Quality Manager

Question & Answer


Question

How do you create a test case and assign a value of a custom attribute of type Date/Time with RQMUrlUtility in IBM Rational Quality Manager (RQM)?

Cause

RQMUrlUtility is a command line tool that is used to GET and PUT/POST test resources to a RQM sever via the RQM Reportable REST API. In the RQM URL Utility wiki page, there is no XML example with custom attribute of Date/Time type.

Answer

To create a test case and assign a value for a custom attribute of Date/Time type, follow these steps:

  1. In the Manage Project Properties page within a given RQM project area, select Custom Attributes > Test Case Attributes.

  2. Click on the plus sign (+), then fill the values, for example:
    • Attribute Name: My Date Time

    • Type: Date/Time

  3. Create a test case via the web interface and put value for the custom attribute My Date Time.
    Note the ID of this newly test case.

  4. Install the RQMUrlUtility

  5. Run the following command, in the working folder of the RQMUrlUtility, to get the XML output file (for example, use the file name output-get.xml) of the test case created at step 3:
    • java -jar RQMUrlUtility.jar -command GET -user <USER> -password <PASSWORD> -filepath <FOLDER_PATH>/output-get.xml -url https://<SERVER>:<PORT>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<PROJECT_AREA>/testcase/urn:com.ibm.rqm:testcase:<ID>

  6. Prepare the new XML file (for example, use the file name input-post.xml) from the XML file you generated in the step 5 in order to create a new test case and assign a value for a custom attribute of Date/Time type. Pay a particular attention to the following part in the XML file:
    • The element <ns6:identifier> must not be present in the XML file because you are creating a new test case.

    • Ensure that you have the custom attribute element in your XML file, for example:

      <ns4:customAttributes>
      <ns4:customAttribute required="true" type="TIMESTAMP">
      <ns4:identifier>My_Date_Time</ns4:identifier>
      <ns4:name>My Date Time</ns4:name>
      <ns4:value>2014-05-23T09:40:08.000Z</ns4:value>
      <ns4:description/>
      </ns4:customAttribute>
      </ns4:customAttributes>


  7. In the working folder of the RQMUrlUtility, run the following command to create a new test case from the XML file you build in step 6:

    java -jar RQMUrlUtility.jar -command POST -user <USER> -password <PASSWORD> -filepath <FOLDER_PATH>/input-post.xml -url https://adminib-6dndg54:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project+de+base/testcase

  8. Check that the new test case has been created in RQM within the given project area and checked that the value for the date/time attribute is correct.

[{"Product":{"code":"SSUVV6","label":"IBM Engineering Test Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"WebUI","Platform":[{"code":"PF033","label":"Windows"}],"Version":"4.0.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Quality Manager

Document Information

Modified date:
16 June 2018

UID

swg21676493