Forum Discussion

kor's avatar
kor
Occasional Contributor
7 years ago

Overwriting log file - command line

How to force test complete to overwrite test results (Log file) when starting tests from command line ?

I tried to use exportLog parameter but each time it requires non-existing log file name. How to resolve it?

 

My command line:

TestComplete.exe "C:\[path to project]" /r /p:ProjectName /t:"Group1" /exportLog:"C:\TestLogs\Log.html"

  • Your secondary solution would work pretty well, actually.

    • kor's avatar
      kor
      Occasional Contributor

      Ok but isn't there any way provided by TC to do it or write to different folders etc. ? It seems to should be so obvious to have that opportunity similar like in SoapUI.

       

      Other solution - can I pass a variable in batch file (e.g. current datetime) to use it as a log name parameter in command line ? It would make each next log name diffrent.

      • Marsha_R's avatar
        Marsha_R
        Moderator

        kor wrote:

        Ok but isn't there any way provided by TC to do it or write to different folders etc. ? It seems to should be so obvious to have that opportunity similar like in SoapUI.

         

        Other solution - can I pass a variable in batch file (e.g. current datetime) to use it as a log name parameter in command line ? It would make each next log name diffrent.


        Yes, you can always write to a different folder.  TC doesn't care where you put the log as long as you tell it precisely where to do so.  You can also email it.  

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    hi kor,

     

    I use for every file I create through tested apps or through TC/TE a suffix made by the Now() function. After some replacements I put this suffix after the file name. very usefull...

  • kor's avatar
    kor
    Occasional Contributor

    Thanks guys for replies.