0

how to correct his error:

The performance counter 'DefaultCounter' has not been started yet. See Details for additional information. 11:24:23 Normal 0,20:
script line(code javacript) CommonFunctions.insertAttributVal(xmlDocRes,"project/Run/run_duration", "Value",aqPerformance.Value()/1000);
Log.Message("Run Duration: "+aqPerformance.Value()/1000);"

how to correct this error

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

0

You probably have a line in your code like this one:

aqPerformance.Value();

and thus want to measure the time of certain actions. The aqPerformance however, works like a stopwatch: the above code gets the current value in your watch. But you need to start the stopwatch before do this. (!) You can start measure calling:

aqPerformance.Start();

I recommend to give a name to your performance counter instead of using the default one. However, that is a matter of taste.

See the example here: https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqperformance/index.html

I hope this helps.

primehunter
  • 280
  • 4
  • 10