It's all about the answers!

Ask a question

Update XML file to link Test case to artifact

Pablo Garijo (11) | asked Nov 15 '22, 2:03 a.m.

 Good morning,

I am trying to import some test cases by using an XML file. I need to link the test case to some artifacts from a RM project area. Which fields do I have to fulfill in the XML? or what do i have to add?.
Is it possible to configure a custom attribute from the XML file?
For this last question I would like to fulfill a "Custom ID" attribute, how could I do that from the rest api call/XML file¿?
Thanks in advance

One answer

permanent link
Ralph Schoon (63.2k33646) | answered Nov 15 '22, 5:57 a.m.
edited Nov 15 '22, 6:01 a.m.

 I doubt you get an answer on this kind of question. It is as open as it gets and there are no details at all, that could help answering it, even if someone wanted to spend hours trying to answer. 

As for all "I want to import stuff" questions, my answer here would be to suggest to try exporting the data first, and then analyze what you got. Then modify it and try to re-import. With respect to tools or APIs to export/import, see especially see the tools in the Extras section at the end. You can look up the documentation for all the extra tools from there.

With respect to APIs, we have this page: where you can browse through them. There are some ELM wide APIs, the others are listed per tool.
A general API that is supported for ETM is the OSLC API that allows to create stuff. 
Another one is the reportable REST API that should usually only allow to report on data, but for ETM it looks like it can also POST/PUT data for updates. It documents how the data should look like. is the whole documentation. You can search here as well e.g. 'test import' for supported test management import formats.

Pablo Garijo commented Nov 15 '22, 6:13 a.m. | edited Nov 15 '22, 6:39 a.m.

  Thank you for your answer. Let me explain you the process I was trying to follow:

  • I have some text files produced by robot framework with information about some Test Suites.
  • I parse those files using python and I produce some xml files to import into QM. The thing is that I dont know how to import a Test Suite xml either manually or using a rest api call (I have never used the rest api for QM purposes, just for RM data).
  • When I create those test cases, I also need to fulfill a custom attribute called "Custom ID". Would this be possible from the XMl file or the rest api call?
  • Additionally I would need to link the artifacts to the tests. I will check the documentation you provided me for that.

So this is the process I am following. My main doubts now are:

Is it possible to import test suites directly from xml?

Could you provide me an example of the rest api used to import a test case/test suite?

Is it possible to modify custom attributes from the xml file?(in this case what should I add to the xml file?)

Is it possible to modify custom attributes from the rest api call?

Thanks in advance, 

Ralph Schoon commented Nov 15 '22, 6:45 a.m. | edited Nov 15 '22, 6:46 a.m.
I would not call that a process, that is some kind of strategy to try to implement something.

There is a ETM Copy Utility that uses the Reportable REST API to copy ETM Artifacts. The Reportable REST API supports XML as content type. The code for the tool is available.

There is an OSLC API for ETM which supports RDF+XML as content type.

So I' am pretty sure you can use some kind of XML format for this kind of stuff.

I am pretty sure that there is no XML import that imports directly from a XML file, but, on the other hand, it might be possible to use cURL, Python or other tools to make that work. For using the reportable REST or the OSLC API you will have to create more infrastructure. 

As already mentioned, you can answer your question about the custom attributes by using these APIs to export/read the data and have a look. I would assume yes until then.

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.