In TestComplete, you can export test results to an external file to view them outside of TestComplete. You can also parse the files containing the exported results.
The Structure of Exported Test Results
When exporting log data in the HTML format, TestComplete generates several files:
-
.htm, .gif, .htc, .js, .css - These files are needed to view the exported logs in Internet Explorer.
-
_root.js - Describes the hierarchy of the exported logs.
-
_*.js - Contain log data:
-
_ProjectSuiteLog.js - Contains the exported data of the project suite log.
-
_ProjectLog.js - Contains the exported data of the project log.
-
_TestLog.js - Contains the data of the exported test log.
-
The Structure of Test Results Exported to XML
If you launch TestComplete with the /exportLogToXMLAlso command-line argument and export test results in the HTML format, in addition to files described above, TestComplete will generate the following XML files:
-
root.xml - Describes the hierarchy of the exported logs.
-
*.xsd - Contain data schemes for the exported logs.
-
*.xml - Contains log data.
Results Scheme
XML
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:aqds="aq-dataschema">
<xs:element name="TestLog" type="aqds:tree" caption="Test Log">
<xs:complexType>
<xs:sequence>
<xs:element name="TestLogItem">
<xs:complexType>
<xs:sequence>
<xs:element name="Type" type="aqds:image" caption="Type"/>
<xs:element name="Message" type="aqds:string" caption="Message"/>
<xs:element name="Time" type="aqds:datetime" caption="Time"/>
<xs:element name="Priority" type="aqds:string" caption="Priority"/>
<xs:element name="Link" type="aqds:hyperlink" caption="Link"/>
<xs:element name="HasPicture" type="aqds:image" caption="Has Picture"/>
<xs:element name="TypeDescription" type="aqds:string" caption="Type Description"/>
<xs:element name="Picture" type="aqds:picture" caption="Picture"/>
<xs:element name="Remarks" type="aqds:text" caption="Remarks"/>
<xs:element name="CallStack" type="aqds:table" caption="Call Stack">
<xs:complexType>
<xs:sequence>
<xs:element name="CallStackItem">
<xs:complexType>
<xs:sequence>
<xs:element name="Type" type="aqds:image" caption="Type"/>
<xs:element name="Test" type="aqds:string" caption="Test"/>
<xs:element name="UnitName" type="aqds:string" caption="Unit Name"/>
<xs:element name="LineNo" type="aqds:int" caption="Line No"/>
</xs:sequence>
<xs:attribute name="id" type="aqds:string"/>
<xs:attribute name="pid" type="aqds:string"/>
<xs:attribute name="nety" type="aqds:boolean"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="aqds:string"/>
<xs:attribute name="pid" type="aqds:string"/>
<xs:attribute name="nety" type="aqds:boolean"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Each set of data for the TestLog
type consists of a sequence of TestLogItem
elements. TestLogItem
consists of a set of fields and attributes. For example, the Message field of the aqds:string
type and the id
attribute of the aqds:string
type. The fields can have one of the following types:
Type | Description |
---|---|
aqds:string | String type. |
aqds:text | Text of memos and descriptions that may contain line breaks and tab symbols (for instance, the Remarks section of the Script log). |
aqds:image | The file name (*.jpg) of a log message icon. |
aqds:picture | The file name of an image (.jpg) associated with a message. |
aqds:datetime | The date/time field. |
aqds:boolean | A Boolean value (True/False). |
aqds:int | An integer value. |
aqds:float | A floating-point value. |
aqds:hyperlink | A link to a Web page, file or any other resource. |
aqds:table | A compound (tabular) type. |
aqds:tree | A compound (tabular) type that supports the hierarchy of records. |
The scheme also includes the following attributes:
id
- The identifier of an element (record).pid
- The identifier of the parent element (record).nety
- A logical value indicating whether an element (record) has child elements (records).