Forum Discussion

Kostja's avatar
Kostja
Contributor
10 years ago

Discard the Performance Counters in the test log

Hey guys,

 

i used the sample code on this page --> http://support.smartbear.com/viewarticle/55140/?utm_source=site-search&utm_medium=search-results&utm_campaign=site-search-c&utm_term=scripting+access&_ga=1.260708234.621782120.1429251315

 

and got my logs in a textfile. But the problem is there are also Performce Counters in the list and now i wanted to know if it is possible to discard the Performance Counters from the list.

 

performance counters.png

  • Hi Kostja,

    In the beginning of the ExportLogData function, check the Scheme.Name. If it's "Performance Counters", skip the rest of the function.

     

    // JScript

    function ExportLogData(ALogData) { var Scheme = ALogData.Scheme; if (Scheme.Name == "Performance Counters") return;

    // ...
    }
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Kostja,

    In the beginning of the ExportLogData function, check the Scheme.Name. If it's "Performance Counters", skip the rest of the function.

     

    // JScript

    function ExportLogData(ALogData) { var Scheme = ALogData.Scheme; if (Scheme.Name == "Performance Counters") return;

    // ...
    }
    • Kostja's avatar
      Kostja
      Contributor

      Great!

       

      Thank you, Helen.

       

      But I have another question...is it possible to get only the log of the currently running test drive? I only managed to get the record of the previous log or is it impossible, because while the test drive is running the logs are not created?

       

      When i try to get the current test log in a text-file it results in being empty.

       

      Sorry for the simple questions, but i just started with TestComplete a month ago.

       

      Thanks for help in advance.

      • Kostja's avatar
        Kostja
        Contributor

        Hey,

         

        I checked the log directory for the logs during a test run and it was empty (unless i turn the pictures on/pause or stop the test).

         

        Is there any possibility to retrieve the logs during the test run?

         

        (I know its another topic/question now, but i thought it is better i ask here then to create a new one)

         

        I'm receptive for any advice.

         

        Thanks.