Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to insert Test Artifact attachments in an ETM report



I have a PUB template in which I manage to insert attachments in the resulting documents.

By using RQMUrlUtility.jar and use that command in the Include File element:
"cmd /C " +  _command
    
Where _command string is something like:
 java
 -jar 
"/IBM/JazzTeamServer7.0.2/server/liberty/servers/clm/RQMUrlUtility.jar" 
 -command GET -user <userid> -password <password> -filepath /tmp/ -url 
https://<host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<ProjectUUID>/attachment/urn:com.ibm.rqm:attachment:55

    
I manage to generate a document with the physically embedded attachment.

At this point I want to use that template (.dta) as a report resource in ETM (RQM).

1) Looking at the qm.log, the command was not run by RRDG, so I added this in the qm JVM server start up script:
-Dcom.ibm.rational.rpe.enable_commands=true

That seem to solve the first step.

2)
Since the server is Linux, the following was not running:
"cmd /C " +  _command

Instead, I tried to use this in a JavaScript code element:
java.lang.Runtime.getRuntime().exec("java -jar ...");
Still that does not work
In the qm.log I can read:
2022-04-08 10:31:13,174 [       RRDG_13870:13990-OUTPUT] ERROR com.ibm.rational.rrdg                              [TID: F42A4D54] - CRRPE3078E The application cannot run command java.lang.UNIXProcess@84ce6b8a.
Cannot run program "java.lang.UNIXProcess@84ce6b8a": error=2, No such file or directory
    
That is the last thing that need to work, running RQMUrlUtility.jar to then insert the resulting file in the document.

0 votes



One answer

Permanent link
To fixe the issue, I wrote a shell script that in turn call the java application.

The PUB template command calls the shell script and not the java app directly.


In PUB:
_command= "./RQMUrlUtility.sh" + " " + QM_user + " " + QM_password + " " + _attachmentsPath + " " + identifier;
    
try {
    java.lang.Runtime.getRuntime().exec(_command); 
}
catch (err) {
}
On the ETM Server the RQMUrlUtility.sh simply calls the java app
java -jar ./RQMUrlUtility.jar -command GET -user $1 -password $2 -filepath $3 -url $4
    



0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 332
× 44

Question asked: Mar 30 '22, 1:11 p.m.

Question was seen: 1,758 times

Last updated: Apr 08 '22, 5:07 p.m.

Confirmation Cancel Confirm