How do I add additional files to an execution result using the CLA?
I have reviewed the article: https://jazz.net/library/article/809/#AttachFiles and cannot get the CLA to return my files to the RQM test results.
Listed below is my "commandline.properties": # Note to U.S. Government Users Restricted Rights: # Use, duplication or disclosure restricted by GSA ADP Schedule # Contract with IBM Corp. ############################################################################### ### ### Exit Code Properties ### # The following properties are used to control the mapping of application exit codes to # RQM result codes. Note that the number in the property value denotes the exit code # number with the exception of '*' which denotes all non-specified exit codes. Note # that no exit code should be repeated and repeating exit codes may map to an unexpected # value. com.ibm.rqm.commandline.exitcode.PASSED=0 com.ibm.rqm.commandline.exitcode.PASSED=1 com.ibm.rqm.commandline.exitcode.FAILED=* com.ibm.rqm.commandline.exitcode.ERROR=40 com.ibm.rqm.commandline.exitcode.INCOMPLETE=41 com.ibm.rqm.commandline.exitcode.INCONCLUSIVE=42 com.ibm.rqm.commandline.exitcode.BLOCKED=43 com.ibm.rqm.commandline.exitcode.PARTIALLY_BLOCKED=44 com.ibm.rqm.commandline.exitcode.PERMANENTLY_FAILED=45 com.ibm.rqm.commandline.exitcode.DEFERRED=46 ### ### Generic Command Line Properties ### # Append default Java system properties to execution result record if this property # is set to true com.ibm.rqm.commandline.systemproperties=False # Optionally define a property file that gets used to update the status of the running # command line execution. This text file must be written in Java properties format with # two properties that the command line adapter will read, "progress" property as an # integer value between 0 - 99 and an optional "comment" property read as a string value. # # If this file exists when the command line execution process begins, it will be truncated # to clear any previous values. # # An environment variable named "qm_ExecutionPropertiesFile" will be created in the # command line execution process and initialized to the value specified. #com.ibm.rqm.commandline.executionproperties=/home/ppos/adapters/execution.properties # Define the set of executables that will be allowed to be run by an instance of this adapter. Any executable # not in this list will be rejected and the execution result record updated to highlight the cause of the failure. # Multiple executables may be specified as long as they are separated by a comma. #com.ibm.rqm.commandline.allowed_executables=first.bat,second.exe,third # Set the maximum size (in megabytes) that is allowed for files attached to the execution result. com.ibm.rqm.adapter.resultAttachmentsFile.maxfilesize=50 ### ### Properties Added to Execution Result ### # All properties that do not start with "com.ibm.rqm." are simply appended to the execution # result file. Note that commandline.properties is read only once at adapter startup. # To dynamically add properties to an Execution Result at runtime, append them to the file specified by # the environment variable qm_CustomPropertiesFile. #application_under_test=undefined #build_id=undefined #application_database=db2 importLog=/home/ppos/qfscripts/logs/report.html Any help is greatly appreciated. |
2 answers
Steve,
Are you running the Command Line Adapter on a Windows Platform?
Is so, try creating a simple .bat file like this:
@ECHO off
ECHO myLogFile=C:/temp/rqmupload.log >> "%qm_AttachmentsFile%"
ECHO Hello World!
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).
Ara
Comments
steve martino
commented Jan 22 '14, 6:12 p.m.
Nope Linux
Are you running shell script?
Can you include the syntax of the line that's referencing the attachment?
This is the script that executes the test using the automation tool QFtest:
steve martino
commented Jan 23 '14, 2:22 p.m.
Figured it out:
Steve,
Are you setting the resulting explicitly but its returning a Failed instead?
Ara
steve martino
commented Jan 23 '14, 4:37 p.m.
I am computing the result based on data from an html file and ending the script with either a "exit 0" or "exit 1"
I am returning an "exit" code from my script that the CLA executes. I am not setting any values.
showing 5 of 7
show 2 more comments
|
Hi Ara
Please could you assist me with directing my execution result to a log file that is created after every test. I have successfully run the test via CLA, and from the configs above, I can see that you point your .bat file to an exact log file. But how would this be done if a new folder is created with the log inside after every test run? Thanks Leesen |
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.