Forum Discussion

Medved's avatar
Medved
Occasional Contributor
6 years ago
Solved

"The log cannot be exported."

Hello Testers,

 

I'd like to generate an HTML test log by command line execution of TestComplete. I executed the following command in windows cmd:

 

C:\Program Files (x86)\SmartBear\TestComplete 12\x64>TestComplete.exe "C:\Users\Username\Documents\TestComplete 12 Projects\MyProjSuite\MyProjSuite.pjs" /run /project:MyProj /ExportLog:"C:\MyLog.html"

 

The test runs (successfully) but after it finished, a popup says "The log cannot be exported." Followed by a german sentence which basically says "Reason: The process was completed successfully." (see file attachment). There is no HTML test report in C:\.

 

The TestComplete projectsuite and project are very basic. There is only one test, which contains a log-message and nothing else.

 

Can anybody help me?

 

Kind regards

Medved

  • Alternatively... you're trying to write the export to your C root directory... most IT departments don't like that... what happens if you export to a sub directory?

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Unless otherwise configured, the test log does not save until the execution of all the tests completes.  So, technically, there is no log to "export".

     

    My suggestion is that, at the end of your test run, add a call to Log.SaveToDisk().  This flushes whatever is in the log directly to disk immediately.  This should then provide something for the export to actually export.

    • Medved's avatar
      Medved
      Occasional Contributor

      Hi tristaanogre,

       

      thanks for your answer. Unfortunately this doesn't work. And the report files appear already during test run.

       

      Kind regards

      Medved

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Alternatively... you're trying to write the export to your C root directory... most IT departments don't like that... what happens if you export to a sub directory?