Ask a Question

Registry/File Change when unchecking Store Logs in TC?

Jaswanth
Occasional Contributor

Registry/File Change when unchecking Store Logs in TC?

Store all Logs option/setting(Tool->Options->Engines->Logs) is unchecked in Test Complete, can this be achieved programatically or by a change in the registry setting?

8 REPLIES 8
tristaanogre
Esteemed Contributor

Unfortunately no... on both.

First, you have to understand the basic architecture of TestComplete.  Prior to starting a test run, some options can be changed.  Think of it as the web.config for a web page or the manifest of an application or some other compiler options when you are compiling the code of an application.  You set all that stuff up BEFORE you compile and then run your application because those things are then built-in to the application as it is compiled that impacts the application execution itself.  Some options can be changed at run time because they don't control the application itself but are methods built into run time.

 

The test log is one of the former.  Upon starting the test, TestComplete needs to know whether or not it will truncate the current set of logs to match the "Number of logs to be stored" field.  The "Store all logs" flag controls part of that... therefore, the option is not accessible during runtime... the same could be considered of any registry edits... but it's not a registry change that controls this but part of the configuration of the application.  

 

Which brings us back to something I asked in your other thread: What is your use case for not writing out log files?  Explanation of this would help us determine if there is some other way we can achieve your desired effect.


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

But shouldn't the value for "Store all logs" be stored somewhere in the system/device? If yes, can you please provide the location. [Say, I wish to keep 5 logs. Where is this numeric value “5” stored?]

tristaanogre
Esteemed Contributor

It is... but again, changing it at run time will not affect the current run.  It's something that's ready in at the start of the test run and used through the test run... so, updating the settings or registry key during the run won't impact the current run.

 

As it is, the file is stored in your user settings AppData\Local\SmartBear\TestComplete\12.0 folder in a file called TCSettings.xml... and it's honestly not something that I'd personally feel comfortable messing with.


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

Again, I ask... why do you need to change the ability to store logs or not?  As mentioned in that other thread, you are storing your logs in the Program Files folder... not exactly the place I'd store logs, or project source to begin with.  

If you want to avoid writing to a log file, just call Log.Enabled = false which will turn off sending any message to the log at the beginning of your test run.  But again...  what's the point?  The Log is the output of the results of test runs... without the log, you're just going through the motions without any feedback as to what is happening.


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

I don't need TestComplete logs because my team has another tool to create/fetch the result. So my requirement is to stop producing any results/logs from TestComplete.

tristaanogre
Esteemed Contributor

Well, the best you can do is Log.Enabled = false.  This will prevent writing anything out to the log... but it won't prevent creating the actual TC log files... they are core of the TestComplete application so you will ALWAYS create at least one log file.


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

Thank you. Can something similar be done for Enable Support for Windows Store application setting?(available from Win 8 and above). This setting is enabled by default. Is there a way to disable this?

tristaanogre
Esteemed Contributor

That setting requires an application restart upon changing so there really is NO way of turning that on or off in code.


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
cancel
Showing results for 
Search instead for 
Did you mean: