how to link/add testcases to test suites with rest api (xml template)
<?xml version="1.0" encoding="UTF-8"?>
xmlns:ns12="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1"
xmlns:ns3="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ns4="http://purl.org/dc/elements/1.1/"
xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/"
xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/"
<ns4:title>TestCase</ns4:title>
<ns4:description>Test Case Creation through Rest API </ns4:description>
<ns5:state>com.ibm.rqm.planning.common.new</ns5:state>
<ns2:variables/>
<ns2:scriptStepCount>1</ns2:scriptStepCount>
<ns2:remotescript href="https://<localhost>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_joJ8cP-MEeeJ27a7PHh-Ow/remotescript/urn:com.ibm.rqm:remotescript:20194" />
<ns2:template href="https://<localhost>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_M_xHQMoFEeqQKPfhtQ8FFw/template/testcase/com.ibm.rqm.planning.templates.testcase.default"/>
</ns2:testcase>
what attribute should i need to add or what i need to do to link testsuite and test script?
Accepted answer
Hi Durga,
To link test script to test suite, you need to enable a property.
Go to Administration -> Manage Project Properties -> Test Case/Suite Preferences -> Use test scripts in test suites
Enable the property Use test scripts in test suites by clicking on the checkbox. Once saved, refresh the page.
Now you can add test script to test suite using web UI or REST API too.
You can also set <ns2:scriptExecution>true</ns2:scriptExecution> in REST PUT Body to mark the suite for script execution.
Thanks,
Monika Rajput