cancel
Showing results for 
Search instead for 
Did you mean: 

check aqPerfomance

SOLVED
Highlighted
Contributor

check aqPerfomance

Hi,

 

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

 

regards

Kai

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: check aqPerfomance

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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
4 REPLIES 4
Community Hero

Re: check aqPerfomance

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
[Community Expert Group]
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
Extensions available
Community Hero

Re: check aqPerfomance

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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Contributor

Re: check aqPerfomance

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

Community Hero

Re: check aqPerfomance

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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Top Kudoed Authors