Forum Discussion

GradyJr's avatar
GradyJr
Contributor
5 years ago
Solved

clearing logs and work without git

I'm trying to solve two issues:

 

1. At the end of my script I am exporting the logs to a network location so I don't really need to keep the logs in TestComplete. Is it possible to script the removal (clearing) of log files after the log export (SaveResultsAs) has completed?

 

2. When I manually start up TestComplete I get a prompt to which i always reply "Work Without Git" (see attachment). I have created a scheduled task that runs my scripts at night after i've left work but this prompt is getting in my way.. Is it possible to supress the Work Without Git prompt when Test Complete is started without unbinding the project? 

  • 1) There is no "in code" way of removing logs.  However, you can set up an environment setting within TestComplete that applies to ALL projects on that machine.  Under Tools -> Options -> Engines -> Log you can set the maximum number of logs to keep.  You can set this as low as 1 and, each time a project is run, the logs auto-delete.

     

    2) I'm curious... how is the project bound to Git if Git is not actually installed on the machine in question?  How did it get bound in the first place? In your scheduled task, have you tried the "/SilentMode" switch?

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    1) There is no "in code" way of removing logs.  However, you can set up an environment setting within TestComplete that applies to ALL projects on that machine.  Under Tools -> Options -> Engines -> Log you can set the maximum number of logs to keep.  You can set this as low as 1 and, each time a project is run, the logs auto-delete.

     

    2) I'm curious... how is the project bound to Git if Git is not actually installed on the machine in question?  How did it get bound in the first place? In your scheduled task, have you tried the "/SilentMode" switch?

    • GradyJr's avatar
      GradyJr
      Contributor

      Thanks!

       

      I had noticed the max log file setting so that will probably have to be the way i go with that.

       

      regarding the issue pertaining to Git (and i confess i'm am very new to this), we use Source Tree to stage/commit/push changes from our local repositories up to the master. When I selected the option to unbind from the project I was no longer getting the "Work without Git" prompt but my local repository was no longer recognized in SourceTree so i had to clone mine again from the master.  Once i finished the cloning process, the prompt "promptly" retuned so i'm back in the same boat. Curiously, only one of my 7 project suites generates the prompt when i bring up Test Complete so for the time being I'm just going to omit that one from the bat file that is the target of my scheduled task until i can figure out a way around it. Once we get our Jenkins up and running I won't need the bat file/scheduled task and it probably won't be an issue. This is a solution i was simply employing until that happens.

    • GradyJr's avatar
      GradyJr
      Contributor

      the silent mode switch did the trick! thanks!