Forum Discussion

cbruck's avatar
11 years ago
Solved

TestExecute - Disable logging entirely

I've designed some testing tools which run continuously, checking the DB for new scripts to run.  In this environment, my log files are getting up above 2 GB.  I would like to be able to disable saving log information for TestExecute (not just suppress the information when it exits).



If I remember correctly, I can capture the event for each type of log and check a variable to see if TestExecute is running (rather than TestComplete, which I use on my own comp and need the logging information).  I could then (at least in theory), set a variable to true which prevents the log event from firing.



Am I the only one who actually wants to disable logging in TE?  I guess I'm in a unique scenario, but it's hard to believe there's no interface option to just disable the log files.
  • There is no such options, however it is still possible.



    You can create handlers for all log events (it is described in Help) and in every handler write

    LogParams.Locked = true;



    This will supress posting a certain event (error, warning, message and so on).



    You can also use Project Variable to create a boolean variable which will specify whether to disable logging or not. THen your even handlers will look something like this



    if(Project.Variable.SupressLog)

    { LogParams.Locked = true; }

2 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor
    There is no such options, however it is still possible.



    You can create handlers for all log events (it is described in Help) and in every handler write

    LogParams.Locked = true;



    This will supress posting a certain event (error, warning, message and so on).



    You can also use Project Variable to create a boolean variable which will specify whether to disable logging or not. THen your even handlers will look something like this



    if(Project.Variable.SupressLog)

    { LogParams.Locked = true; }
    • Nidhi26's avatar
      Nidhi26
      Occasional Contributor

      Were you able to implement this? I am unable to do this for my functional automation project. For negative TC's where i expect 400 response to pass my test case these files are getting genrated .

      ex: Retail-<Test case name>- <Test Step name>-0-FAILED