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:
- In the Manage Project Properties page within a given RQM project area, select Custom Attributes > Test Case Attributes.
- Click on the plus sign (+), then fill the values, for example:
- Attribute Name: My Date Time
- Type: Date/Time
- 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.
- Install the RQMUrlUtility
- 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>
- 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>
- 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
- 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.
Related Information
[{"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
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21676493