It's all about the answers!

Ask a question

Doing mass copy of artefacts without losing the relationship


Anita Chadha (1132) | asked Oct 01 '09, 9:11 a.m.
I need to make a copy of each of the test script in my project and save it with a different name without losing its association with the test case. Has anyone done this before?
I am thinking of using the copy utlity but it doesnt allow me to rename my scripts. The intent is to make a copy of the test script and yet keep it attached to the test case the original test script was associated with.

3 answers



permanent link
John Nason (2.4k1012) | answered Oct 05 '09, 5:21 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The copy tool with the "-nr" (non-recursive) option will get you part of the way there. What is missing is renaming the script when the copy is done.
Truth is, you could get that functionality with an absolutely trivial change to the copy tool. The copy tool ships with its source. Do you have anyone in your group that would be comfortable making a very minor Java change and rebuilding the tool for you? If so, I'll tell show you what needs to be changed.
RQM will include copy functionality in the UI in 2.0.1 but that is some time to wait.
Hope that helps.
Regards,
John


I need to make a copy of each of the test script in my project and save it with a different name without losing its association with the test case. Has anyone done this before?
I am thinking of using the copy utlity but it doesnt allow me to rename my scripts. The intent is to make a copy of the test script and yet keep it attached to the test case the original test script was associated with.

permanent link
Anita Chadha (1132) | answered Oct 05 '09, 9:32 p.m.
Thx for the reply John. I tried using -nr option and it copies the test scripts however
1. it fails with test scripts having keywords in them
2. it does not associate the new scripts with the same test case.


Here is the error message that I am getting while trying to copy the test scripts having keywords(The message was too long so I am pasting here the first part of it)

SEVERE: RestException executing: PUT, RC: 500, message: {"errorTraceMarshall":[{
"errorTraceLineNumber":101,"errorTraceClassName":"com.ibm.rqm.execution.service.
integration.jaxb.util.TestscriptStepUtils","errorTraceMethodName":"collapse","er
rorTraceFileName":"TestscriptStepUtils.java"},{"errorTraceLineNumber":87,"errorT
raceClassName":"com.ibm.rqm.execution.service.integration.jaxb.util.TestscriptSt
epUtils","errorTraceMethodName":"collapse","errorTraceFileName":"TestscriptStepU
tils.java"},{"errorTraceLineNumber":128,"errorTraceClassName":"com.ibm.rqm.execu
tion.service.integration.jaxb.TestscriptPutHandler","errorTraceMethodName":"unma
rshal","errorTraceFileName":"TestscriptPutHandler.java"},{"errorTraceLineNumber"
:1,"errorTraceClassName":"com.ibm.rqm.execution.service.integration.jaxb.Testscr
iptPutHandler","errorTraceMethodName":"unmarshal","errorTraceFileName":"Testscri
ptPutHandler.java

permanent link
John Nason (2.4k1012) | answered Oct 06 '09, 6:28 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Sorry - for whatever reason I had the relationship wrong in my head. Test Cases contain references to Test Scripts, not the other way around so it makes sense that your new (copied) test scripts lose that association. You could always add them back manually to the test case. Not sure what volume you're looking at but it should be feasible.

Regarding keywords - I think you've identified a limitation of doing a Test Script copy with Keyword references using the "-nr" option. If you use the copy without "-nr" you'll get copies of Test Scripts, Datapools, Keywords, and Attachments.

Regards,
John

Thx for the reply John. I tried using -nr option and it copies the test scripts however
1. it fails with test scripts having keywords in them
2. it does not associate the new scripts with the same test case.


Here is the error message that I am getting while trying to copy the test scripts having keywords(The message was too long so I am pasting here the first part of it)

SEVERE: RestException executing: PUT, RC: 500, message: {"errorTraceMarshall":

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.