You can attach files and links to the Result Details section
of a command-line adapter execution result.
About this task
The process that runs the command-line test includes the qm_AttachmentsFile environment
variable, whose value is the full path to a temporary file. The command-line
test can update this temporary file to specify files and URLs to attach
to the execution result.
Procedure
During the command-line test execution, update the temporary
file with a list of files or URLs to include as attachments to the
execution result. The format is a java.util.Properties file
with name-and-value pairs. The name represents the name of the attachment
that is displayed in the Result Details section of the execution result.
The value portion of each line in the file specifies either the absolute
path to a file that is local to the computer that is running the test,
or a URL. This example includes name-and-value pairs:
myLogFile=C:\\temp\\logfile.log
myDataFile=D:/temp/datafile.dat
myURL=http://www.mywikipage.com
If a file is specified,
an attachment is created that contains the file contents, and the
file is added to the Result Details section of the execution result.
To
add attachments and links to command-line execution results:
- The script or executable that is invoked by your command-line
test script needs to modify the temporary file referenced by the qm_AttachmentsFile environment
variable to add lines similar to those shown above. For
example, if you are executing a shell script, update the temporary
file by including lines similar to these in your shell script:
echo myLink=http://www.ibm.com >> $qm_AttachmentsFile
echo myFile=/tmp/temp.txt >> $qm_AttachmentsFile
Notes: - URLs cannot be longer than 1000 characters.
- Link names cannot include these characters: spaces, tabs, quotation
marks, double quotation marks, angle brackets (< and >) and ampersands
(&).
- You can specify Windows style
path names by using forward-slash (/) or backslash (\) characters
as the separator. If you use a backslash, you must escape it. For
example, type \\.
- Run the command-line test script.
- Review the execution result and verify that the attachments
are included in the Result Details section:
