Forum Discussion

egiacomi's avatar
egiacomi
Contributor
6 years ago

How can I check an event like the start run execution(first test started) and the end ?

Hi,

in my organize test i have some utility scripts , i want to exclude these script from the final log and to do this i thought i'd run them after checking the start run execution event .

I have the same problem for the end run execution, how can i check these events?

 

Emanuele

  • Anything that is a Test Item in a project will show up as a node.  Your best best is to incorporate your utility code somehow into your tests or, if they are build up andtear down kinds of things, perhaps make a completely different project and add it to the project suite to execute before your main project and another project for tear down to execute after the main project.  Then your log for your main project will be pristine.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not sure what you mean by "exclude them from final log"?

     

    As for starting test and ending test, in the help, look into the OnStartTest and OnStopTest event handlers.

    • egiacomi's avatar
      egiacomi
      Contributor

      Sorry maybe I explained myself wrong, i want to check the start execution of the first test and the end execution of the last test . For example if I use the event OnStartTest I can't know if it's the start of the first or second or third test

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        How are you organizing your tests in TestComplete?  Are you using TestItems to do so?

        If that's the case, you could simply set your utility scripts as the first test items that execute and the last ones that execute.  Then, in those tests, do a Log.Enabled = false until the utilities are done and then Log.Enabled = true when they are finished.  That will turn on/off the test log for those scripts.