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

Need XML temple for importing a test case

I am using ETM version 7.0.3 and I want to find the XML format to import a test case. 
I tried to export an exiting test case but it only give me option of export to PDF.


I tried to install ETM-Extras-ETMExcelWordImporter-7.0.3 but it is for Windows and I am using MAC.
Is these some easy way to get the XML format to import test cases.
I want to simply use Contruction ->. Import Test Case option and provide the XMLfile 

E.g what REST Url will be used to get XML output if I am using following web link to see the test case on the web
https://<host>:11443/jazz/web/console/<projectname>#action=com.ibm.rqm.planning.home.actionDispatcher&subAction=viewTestCase&id=129189

0 votes



One answer

Permanent link
You could try something like this to get the test cases attributes/categories and values (sample shell commands - sorry formatting is garbage):

# Example shell commands

# Define your ELM server

etm_server="your.elm.server.com"

# Assume you're working with Global Configurations because you're probably linking test cases to requirements in ERM so get the GC ID (can get this from the end of the GC URL)

gc_id=<your GC id as integer>

# Service/configuration URLs

restapi_base_url="https://$etm_server/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources"

gc_context="https://$etm_server/gc/configuration/$gc_id"

config_context="oslc_config.context=$gc_context"

# You can get the 'real' project names on your server by using such a URL in your browser (change for your server name): https://your.elm.server.com/qm/service/com.ibm.rqm.integration.service.IIntegrationService/projects

project_alias="your ETM project name"

# Define a test case ID that you will get from the above project

TC_ID=<a Test Case Identifier>

# Setup your connection url

tc_url="$restapi_base_url/$project_alias/testcase/urn:com.ibm.rqm:testcase:$TC_ID?${config_context}"

# curl to get the test case details (as XML)

# Note: the curl command assumes your .netrc is set up with userid & password. If not you must supply your credentials as parameters.

testcase_xml=$(curl -kns "$tc_url" -H 'Accept: application/xml')

# Note: $testcase_xml will be a (long) string - to make it more readable, write the XML to a file and add some newlines

echo "$testcase_xml" > mytestcase.xml

sed -i -e 's/<ns/\n<ns/g' mytestcase.xml


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
× 12,060

Question asked: Mar 15, 7:12 a.m.

Question was seen: 336 times

Last updated: Apr 02, 9:04 a.m.

Confirmation Cancel Confirm