Applies to TestComplete 12.40, last modified on October 6, 2017

You can export the test results to view them outside of TestComplete.

Exporting Results From the Project Explorer

  • In the Project Explorer, right-click the needed results under the Project Log or Project Suite Log node and then click Export to.

  • The Choose Storage Type and Location dialog appears:

    Choose Storage Type and Location Dialog
  • Select the export format from the Export results to combo box:

    • Unpacked Storage (Default) - An HTML page with images, scripts, styles and helper data files. The page name is always index.htm.

    • Multipart Hypertext Storage - A web page archive (a single MHT file that contains the web page and all accompanying files). Note that:

      • MHT files can be viewed in Internet Explorer (we recommend version 9 or later), but not Chrome or Firefox.

      • If you send MHT files via email, the recipient may need to unblock the MHT file to view its contents. For details, see Issue With Multipart Hypertext Files Sent via E-mail.

  • Specify the Folder (if exporting as an HTML file) or File name (if exporting to MHT) to be created.

  • (Optional.) To include Test Visualizer images in the exported log, select Save Visualizer images. Note that these images take additional disk space.

  • Click OK.

Exporting Results From the Log Page

Export to HTML or MHT

  • Double-click a log in the Project Explorer to open it.

  • You can export the full log, a specific log node (for example, a test item log), or a single entry in the log.

    To export the entire or partial log:

    Right-click the desired node in the log tree and select Export to from the context menu:

    Exporting a partial log

    To export a single row or folder:

    Right-click the desired row in the log, and select Export Current Row from the context menu:

    Exporting the current log row
  • The Choose Storage Type and Location dialog appears, where you can select the export format and options (see above).

Export to PDF

  • Double-click a log in the Project Explorer to open it.

  • Right-click within the Test Log panel and select Print Preview from the context menu. The Print Preview window appears.

  • Click Export To PDF on the toolbar.

    -- or --

    Select File | Export To PDF from the main menu of Print Preview.

  • The PDF Export Options dialog appears, where you can specify PDF export options. If you want TestComplete to open the generated file right after the results have been exported to it, enable the Open After Export option.

Exporting Results From Tests

To export the entire test log from tests, use the Log.SaveResultsAs method:

JavaScript, JScript

Log.SaveResultsAs("C:\\Work\\Log.mht", lsMHT);


Log.SaveResultsAs("C:\\Work\\Log.mht", lsMHT)


Call Log.SaveResultsAs("C:\Work\Log.mht", lsMHT)


Log.SaveResultsAs('C:\Work\Log.mht', lsMHT);

C++Script, C#Script

Log["SaveResultsAs"]("C:\\Work\\Log.mht", lsMHT);

The export format (XML, HTML, or MHT) is the second parameter. The first parameter is the file path (when exporting to XML or MHT) or folder path (when exporting to HTML) to save the log to.

If your project has several test items whose results you want to export, call Log.SaveResultsAs from the last test item only.

Exporting Results From Command Line

To export results to a .mht or .tcLogX file from the TestComplete command line, use the /exportLog command-line argument.

To export results to the .mht file:

TestComplete.exe "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.mht"

To export results to the .tcLogX format:

TestComplete.exe "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.tcLogX"

To export results to a .html file:

TestComplete.exe "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.html"

Tip: TestComplete also supports the .htm extension.

For more information on TestComplete command-line arguments, see TestComplete Command Line.

About .tcLogX Format

.tcLogX is the TestComplete internal file format. It is a single file (archive) that contains test log data.

.tcLogX files are created by exporting test results from the TestComplete command line (see above).

You can import .tcLogX logs into your project as follows:

  • Open a project in TestComplete.

  • In the Project Explorer, right-click the <ProjectName> Logs node and select Add | Existing Log File.

  • Browse for a .tcLogX file and click Open.

The log is added to your project and you can now view it in TestComplete.

See Also

Exporting Test Results
Viewing Exported Results
Exporting Test Results - Know Limitations
Managing Log Files
Sending Results via E-Mail - About