Ask a Question

Overwriting log file - command line

SOLVED
kor
Occasional Contributor

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"

7 REPLIES 7
m_essaid
Valued Contributor

try delete it before doing that ?

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.

tristaanogre
Esteemed Contributor

Your secondary solution would work pretty well, actually.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
kor
Occasional Contributor

So I'll try that solution, thanks.

Marsha_R
Champion Level 2


@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
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
Occasional Contributor

Thanks guys for replies.

 

cancel
Showing results for 
Search instead for 
Did you mean: