How to attach external execution result files in RQM result log?
6 answers
echo myReport1=C:/tmp/report1.html >> "%qm_AttachmentsFile%"
echo myReport2=C:/tmp/report2.html >> "%qm_AttachmentsFile%"
...
echo myReportN=C:/tmp/reportN.html >> "%qm_AttachmentsFile%"
Note that I'm using forward slashes in the path pointing to the report file even on Windows platform. Since that value is going into a java properties file we either need to use forward slashes or escape any usage of backslashes. Also note the quotes around the evaluation of qm_AttachementsFile in case the path has any spaces in it (which it often does for temporary files).
If you are not invoking a .bat script, and still need some help, please let me know.
Comments
Thanks Tom for chiming in
Thanks Tom for such a detailed response. I am using Windows bat script. I followed the steps you mentioned. After execution, the RQM result has a "QMAdapter44108.err" file attached. This error file contains the msg "The system cannot find the path specified."
I am not sure what I am doing wrong. Please find by batch script
E:\RQM\MyScript.exe echo myReport1=C:\Logs\InfoLog.html >> "%qm_AttachmentsFile%" EXIT 0
One question... Support for attaching external file is present in RQM 4.0... Is is also supported in RQM 3.0???
As per work item https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=21416 , it is supported in RQM 4.0.
I am using RQM 3.0.Please confirm.
Thanks, Sanam
Hello Sanam. In answer to your first question, you need to use forward slashes in the pathname to your report file, ie. echo myReport1=c:/Logs/InfoLog.html >> "%qm_AttachmentsFile%". Regarding your second question, this support is only available in RQM 4.0 and later.
Hi Preeti, if you are seeing this
AutomationReport="http://xx.ibm.com/ResultsSummary.html >> "C:\Documents and Settings\Administrator\Local Settings\Temp\QMAdapter1410188893623044333.attach"
on the stdout (.out file) then the redirection is somehow being escaped. The variable name and it's value should be going into the file associated with the value of %qm_AttachementsFile%. I noticed in your post there is a missing double-quote after the variable value (ie. AutomationReport="http://xx.ibm.com/ResultsSummary.html). Is this because you mistyped what you see in the .out file or is it really missing there? If it's really missing, you could try removing the double-quotes around %reportLink% in your .bat script to see if that makes any difference.
Hi Thomas, I tried without quotes still getting same line without quotes with replace value of %reportLink%.
Preeti, that command looks correct. If you are seeing that in the stdout file attached to the execution result then somehow the redirection (ie. >>) is being escaped. If the line "AutomationReport=http://xx.ibm.com/ResultsSummary.html" gets placed in
C:\Documents and Settings\Administrator\Local Settings\Temp\QMAdapter1410188893623044333.attach, then your file will be attached to the execution result.
You need to get the full path of the file. For that you should try to get value of Environment variable "com.ibm.rqm.adapter.resultAttachmentsFile". Then you can open this file and provide details about the attachment.
Let me know if this does solve your problem.
-|- Pramod Chandoria
I want to add custom attachment files to the result after my RFT is executed from RQM.
I made some tests and it seems that the variable qm_AttachmentsFile is not available during the execution of the RFT script. I'm trying to retrieve it using the same I retrieve other Execution Variables passed to the script.
Comments
Currently I don't believe the RFT adapter supports this. The RQM adapter library does contain the required infrastructure, but the RFT adapter would have to be modified to make use of it. You could open an enhancement request for such support in a future release of the RFT adapter. One other thing to note, qm_AttachmentsFile is an environment variable, not an execution variable. RFT may implement something similar to what the command line adapter does using Execution Variables. You might suggest this in the enhancement request.
Thanks Thomas
I just created the RFE at Developer Works
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=35863
I think that is the right place to created the request right ?
!!PROBLEM SOLVED!!
I've spent many hours looking at some posts about this issue but no answer at all.
So I was trying to change the sintax on the .bat file and I realized how it works. Check the example below to attach links and files:
ECHO IBMSite=http://www.ibm.com >> %qm_AttachmentsFile%
ECHO GoogleSite=http://www.google.com >> %qm_AttachmentsFile%
ECHO RXLog=C:\\TEMP\\automacao.rtf >> %qm_AttachmentsFile%
I still have some doubts:
- How can I upload files when I running a .exe file instead of a .bat file?
- How can I indicate the file name dynamically since the file name of the execution log is a random and contains date and time?
Please Help!
If someone can help me with my query, it will be really appreciated..