Each time a script or batch queue runs the results are saved to the Results sub folder of the directory from which the script or batch queue is loaded. The results are saved in an Extensible Mark up Language (XML) file. For scripts there is also a file with a log extension which contains all trace information generated during the run and a file with a tsrrec extension containing details to allow a script to be played back if a fault is found.
Scripts that use the CopyLogFile or MoveLogFile commands will also save these files into the Results directory with the same format as below.
Each of the files has the following format
<Script Name>YYYY_MM_DD_HH_mm_SS.(xml|log|tsrrec) Where: -
The log file contains one line per trace entry in the form: -
YYYY/MM/DD HH:mm:SS.Tht <Type> :<Variable>:<Text> Where: -
|T||Tenths of second|
|H||Hundredth of second|
|t||Thousandths of second|
|<Type>||Finest | Finer | Fine | Config | Info | Warn | Severe|
|<Text>||The trace message|
When a batch queue is run a results file is also created containing the result and a link to the script results for each entry. A batch queue results file example is Regression_2009_07_20_20_07_23.xml.
An example of a script log file is video.tsr_2009_07_20_21_09_10.log
The XML file contains the results in Extensible Mark up Language format. You can double click on this file to view the results as a web page. An example of a results xml file for a pass is regression.tsr_2009_07_20_21_13_32.xml and a fail is video.tsr_2009_07_20_21_09_10.xml. At the top of the file you will see the results summary, results for each iteration and links to all the log files.
If you have used the CopyLogFile or MoveLogFile commands these will appear in the links at the top of the results see LogFile.tsr_2009_07_20_21_13_41.xml which copies the script to the results.
As the XML file has a well-defined structure you can use this file should you wish to create your own results analysis software. If you are not familiar with XML please checkout the W3schools tutorial at http://www.w3schools.com/xml before proceeding as the terms used may not be understood.
The root element of the XML is results which has the following tags: -
|script_name||The name of the script|
|host_name||The name of the PC that run the script|
|date||The date of the results (format YYYY-MM-DD)|
|time||The time of the results (format HH:MM:SS)|
|node||A node represents a line in the script|
Each node element has the following tags: -
|type||The type of the node (e. g. root, comment, assignment)|
|text||The script text as seen on the GUI|
|run||A script run with results (zero or more of these)|
|overall_result||The overall result for this node|
|node||A child script node (zero or more of these)|
Each run element has the following tags: -
|result||The result for this run.|
|timetakensec||The number of seconds taken to execute the script line.|
|date||The date the script line was executed (format YYYY-MM-DD)|
|time||The time the script line was executed (format HH-MM-SS)|
As the results files are in XML you can display them using alternate style sheets (XSL) files. You will find an html file called ViewResults.html. This allows you to select the results file and any XSL style sheet in the Test Script Runner install directory or the current directory. Test Script Runner comes with two extra style sheets called Failures1_0.xsl and Summary1_0.xsl which display the results either failures only or just the summary. Please note this requires Active X and will only work when the results are on the local disk unless you set your security very low. Please also note this uses Microsoft Specific scripting and will only work on Microsoft Internet Explorer.