Link Test Plan to Test Case with Python
![]()
Hello,
I'm working on automatisation scripts about ETM and i would like to know if it's possible to automaticaly link a test plans to a test case with python.
Thanks in advance,
Mattéo Dupré
|
Accepted answer
![]()
Ian Barnard (2.0k●6●13)
| answered Jun 20 '23, 12:20 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 20 '23, 12:33 p.m. You'd use the OSLC APIs - for more info start here https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding
NOTE create the link by PUT on the thing at the 'from' end which in your case would be the Test Case.
There are probably existing questions on here with an example of creating a link in ETM, please search.
There's a technote How to add requirement links to existing Test Cases (ibm.com) about creating links but it misses that you need to add these headers:
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
Accept: applicaiton/xml
and somewhere you'll need to specify the configuration - either as an additional parameter in the URL &oslc_config.context=... or as header Configuration-Context: configuration URL.
Mattéo Dupré selected this answer as the correct answer
Comments Thanks you !
FYI yhe best way to see how to add a link to the test case is to manually create such a link then GET the test case RDF.
|
One other answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jun 20 '23, 10:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER As far as I can tell, ETM provides APIs that can be used to create and update artefacts.
As far as I am aware, there is no hook, or whatever extension mechanism that would allow a customer to create automation for the Test artefacts. It is not really possible for customers to create advisors/preconditions or participants/follow up actions. The SDK is not available to customers.
So you can create automation to create and link artifacts - using the available APIs.
|
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.
Comments
But what do you mean "automatically"?
By "automatically" I mean that I want to associate a test case to a test plan when a test plan is created. The main goal is that every test plan got a TCER.
This is a page with all the APIs that are available by product.