It's all about the answers!

Ask a question

Link Test Plan to Test Case with Python


Mattéo Dupré (132) | asked Jun 19 '23, 9:06 a.m.
edited Jun 20 '23, 8:55 a.m.
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é

Comments
Ian Barnard commented Jun 20 '23, 9:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'm fairly sure it's possible to link a test case to a test plan using the ETM OSLC API. Python could just be the means of generating HTTP operations i.e. to drive the ETM OSLC API.

But what do you mean "automatically"?


Mattéo Dupré commented Jun 20 '23, 9:23 a.m.

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.


Ralph Schoon commented Jun 20 '23, 9:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

This is a page with all the APIs that are available by product.

Accepted answer


permanent link
Ian Barnard (2.1k613) | 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
Mattéo Dupré commented Jun 21 '23, 3:51 a.m.

Thanks you !


Ian Barnard commented Jun 21 '23, 3:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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



permanent link
Ralph Schoon (63.5k33646) | 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


Register or 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.