It's all about the answers!

Ask a question

How to insert Test Artifact attachments in an ETM report


Pierre Bentkowski (106517) | asked Mar 30 '22, 1:11 p.m.
edited Apr 08 '22, 5:07 p.m.


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.

One answer



permanent link
Pierre Bentkowski (106517) | answered Apr 08 '22, 4:57 p.m.
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
    



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.