[Expand]General Information/viewarticle/88628/
 [Expand]Using Help System/viewarticle/81465/
 [Expand]Getting Started Tutorial/viewarticle/82003/
 [Collapse]Using TestComplete/viewarticle/84431/
  [Expand]TestComplete User Interface, Projects and Settings/viewarticle/87798/
  [Expand]Creating, Recording and Running Tests/viewarticle/88044/
  [Collapse]Test Results/viewarticle/80579/
    About Test Log/viewarticle/80690/
   [Expand]Test Log Window/viewarticle/82147/
   [Expand]Viewing Test Results/viewarticle/82127/
   [Collapse]Working With Test Results/viewarticle/82071/
     Adding and Deleting Log Files/viewarticle/82114/
     Renaming Log Items and Adding Comments to Them/viewarticle/80759/
     Printing Test Results/viewarticle/80664/
    [Collapse]Exporting Test Results/viewarticle/82067/
      Exporting Test Results in TestComplete/viewarticle/80694/
      Viewing Exported Results/viewarticle/82068/
      Working With Exported Results/viewarticle/82074/
      Know Limitations/viewarticle/82064/
      Exported Results Structure/viewarticle/82072/
      Exporting Test Results to a PDF File/viewarticle/82070/
    [Expand]Archiving Test Results/viewarticle/80863/
     Sending Results via E-Mail/viewarticle/82066/
     Creating Issue Reports for Test Results/viewarticle/81212/
     Scripting Access to the Test Log Contents/viewarticle/80704/
   [Expand]Posting Messages, Images and Files to the Log/viewarticle/80620/
  [Expand]Enhancing Tests/viewarticle/83506/
  [Expand]Teamwork and Integration Into QA Process/viewarticle/84972/
  [Expand]Extending TestComplete/viewarticle/81408/
  [Expand]Automating TestComplete/viewarticle/88022/
  [Expand]Best Practices/viewarticle/87218/
 [Expand]Testing Types/viewarticle/85355/
 [Expand]Applications Testing/viewarticle/83383/
 [Expand]Working With Application Objects and Controls/viewarticle/81481/
 [Expand]Samples and Tutorials/viewarticle/81997/
 [Expand]Other Tools That Help You Test Better/viewarticle/82893/
 [Expand]TestComplete Licensing Guide/viewarticle/88365/
Updated: 10/12/2016 Applies To: TestComplete 12 Rating: Not badNot badNot badNot badNot bad 2 vote(s) Click to rate: PoorNot badAverageGoodExcellent
Exporting Test Results

Exporting Test Results in TestComplete

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 the Command Line

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

To export results to a .mht file:

"C:\Program Files\SmartBear\TestComplete 12\Bin\TestComplete.exe" "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.mht"

To export results to the .tcLogX format:

"C:\Program Files\SmartBear\TestComplete 12\Bin\TestComplete.exe" "C:\My Projects\MySuite.pjs" /run /p:MyProj /exportLog:"C:\TestLogs\Log.tcLogX"

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

About .tcLogX Format

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

.tcLogX files are created by exporting test results from TestComplete’s 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 | Printing Test Results | Sending Results via E-Mail

© 2016 SmartBear Software. All rights reserved.
Email Send feedback on this document