cancel
Showing results for 
Search instead for 
Did you mean: 

Information Window on TestExecute Start

SOLVED
Highlighted
Occasional Contributor

Information Window on TestExecute Start

Because of limited disk space where we have TestExecute installed, I need to delete local logs after I've exported/emailed them. I was initially going to do this at the very end of the day via a script that deletes the files directly, deleting all logs for that day. I'm getting this information window the next time the suite tries to run (because the previous days logs are now gone).

image.png

Is there a way to get rid of this without manual intervention? Or a way to cleanly delete local logs from within TestExecute that doesn't leave this error on the next run?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Information Window on TestExecute Start

Generally speaking, you probably should not just simply delete the logs off the hard drive in the matter in which you're doing.  That .tcLogs file tracks what logs are "attached" to the project so, when you delete the actual logs, when the project starts up, it tries to find the files and, therefore, generates the message when it cannot.

 

If you want to "purge" logs on a regular basis, I believe someone has already mentioned that you should set your "Number of recent logs to keep" setting to a lower value.  This is a per-machine setting, configured within the TestExecute application.  Run TestExecute standalone, right click on the icon in your systray, select "Options", go to "Engines -> Log" and set the "Store all logs" flag to be UNCHECKED and set the "Number of recent logs to keep" setting to something smaller... 3 or 4 depending upon how much history you want.

 

Doing so will have TestExecute automatically DELETE logs on start up of the project, starting with the oldest, until the number of logs stored equals that setting.  This automatically updates the .tcLogs file and you won't get that message.


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

View solution in original post

10 REPLIES 10
Highlighted
Staff

Re: Information Window on TestExecute Start

There is an option within tools>options>engine>Logs where you can declare how many of the logs you want to keep post execution

image.png

Or you could just set up a simple script routine in the beginning of your project as a sort of a startup/setup script that deletes all files from that location,

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfilesystem/deletefile.ht...

Or if you are using jenkins or any other sort of CI tool that relys on pulling code from a source control repository, you could have a tear down script or a build step afterwards that just deletes the entire workspace:

 

ie:

cd "C:\myresults folder directory"

del * /S /Q

Best,
Justin Kim
Highlighted
Occasional Contributor

Re: Information Window on TestExecute Start

I currently have a script to delete the files using aqFileSystem, but it does it at the end of the day for the current days logs. I think this is what's causing the error since it's deleting the log of the delete script as well.

 

I like your idea of doing it at the beginning of the run. I could delete the previous days logs, that way it wouldn't affect the currently running tests. I'll test this out to see if it prevents the error. I also didn't know about that option to delete logs post execution.

 

Thanks!

Highlighted
Staff

Re: Information Window on TestExecute Start

@bcarter85 

if you were already using aqfilesystem, I'd say you're already almost there in terms of never seeing that problem again. It's most likely a sequence issue. if the memory allows, you could just have it such that you only keep 1 or 2 of the previous test logs, or you could just as easily delete the previous logs in the beginning of your test runs as i mentioned before. Hopefully, that will solve the "file not found problem".

 

The reference i made at the end about a tear down script (now that i look back at it, may cause the same error). I think by default, just deleting the files in the beginning as a part of your run may be the safest bet. Either way, you're welcome to try using the batch file commands that i wrote above to see if it would solve any of your problems.

Best,
Justin Kim
Highlighted
Community Leader

Re: Information Window on TestExecute Start

Hello bcarter85

 

There is a file inside this path:

 

C:\work\testyAutomatyczne\impuls_1_3\Impuls\Log

 

which contains the list of actually registered log files inside Testcomplete IDE I think. This is a .xml file so You can parse it into an object or even JSON I think.

 

There is a connection between a log file inside the "Log" folder and this .xml file.

 

So

 

Search for values -> delete inside .xml and from disc

Highlighted
Occasional Contributor

Re: Information Window on TestExecute Start

@WambooI don't have any XML files in my log folders, unless you're referring to the .tcLogs files.

Highlighted
Community Leader

Re: Information Window on TestExecute Start

Yes, that's the correct one. You are right

Highlighted
Community Manager

Re: Information Window on TestExecute Start

Thank you everyone!

 

@bcarter85 , were you able to solve this? Plaese share the solution with the CommunitySmiley Happy


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

Re: Information Window on TestExecute Start

@sonya_mNo, I was not able to resolve it. I was able to delete the files from the drive, but it still requires manual intervention in order to not have the popup the next time TestExecute automatically opens. I could not find a way for TC to open and edit the tcLogs files.

Highlighted
Community Hero

Re: Information Window on TestExecute Start

Generally speaking, you probably should not just simply delete the logs off the hard drive in the matter in which you're doing.  That .tcLogs file tracks what logs are "attached" to the project so, when you delete the actual logs, when the project starts up, it tries to find the files and, therefore, generates the message when it cannot.

 

If you want to "purge" logs on a regular basis, I believe someone has already mentioned that you should set your "Number of recent logs to keep" setting to a lower value.  This is a per-machine setting, configured within the TestExecute application.  Run TestExecute standalone, right click on the icon in your systray, select "Options", go to "Engines -> Log" and set the "Store all logs" flag to be UNCHECKED and set the "Number of recent logs to keep" setting to something smaller... 3 or 4 depending upon how much history you want.

 

Doing so will have TestExecute automatically DELETE logs on start up of the project, starting with the oldest, until the number of logs stored equals that setting.  This automatically updates the .tcLogs file and you won't get that message.


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

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors