Ask a Question

check aqPerfomance

SOLVED
kaivi
Contributor

check aqPerfomance

Hi,

 

is there any way to check if the aqPerfomance method is already running?

 

regards

Kai

4 REPLIES 4
tristaanogre
Esteemed Contributor

The methods of the aqPerformance object aren't actually "running" per say... they are more markers that store values.  You "Start" a counter which logs a time stamp... then you "Check" the counter against the current time... or you get the "Value" of a counter...  So, it's not exactly "running" per se.

What are you trying to achieve?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
AlexKaras
Community Hero

Hi Kai,

 

No way if I got your question right. But you may suppress warning in the log with the help of the WarnIfExist parameter.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

Hi,


thank you both for your answer. I have added the OnLogError feature to our tests. So every error is recorded here. Normally I start the aqPerfomance Default at the beginning of a keyword test and when the keyword test generates an error, it jumps to the OnLogError and stops, checks and evaluates the aqPerfomance. But if I start a selected operation in the middle of a keyword test just to check if e.g. a change is correct, it jumps to OnLogError if an error occurs and starts another error because the aqPermonce is not started yet. This is a recursive call from OnLogError that is stopped by TestComplete. The motivation behind this is to write the aqPErfomance value to a DB.

I hope you know what im trying to do.

For now, I think I'll try it with "try" and "catch" of an exception. Or with the WarnIfExists I didn't know about it before, so I investigate it.

 

regards

 

Kai

Hi,

 

> This is a recursive call from OnLogError that is stopped by TestComplete.

A possible way to prevent this is to introduce a global or Project variable (I think that the latter is better) and use it as a flag. Like this:

-- Name the variable as, say, bInErrorHandler and set it to false by default;

-- The OnLogError function may look like this:

function OnLogError(...)
{
  if (bInErrorHandler)
    return;
  bInErrorHandler = true;

... // main handler's code

  bInErrorHandler = false;
}

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: