Ask a Question

Remove the "improve your test performance" in test log

Luukdb
Contributor

Remove the "improve your test performance" in test log

Hello,

 

After the latest TestComplete update, the testlogs now show the message "Improve your test performance".

In those logs TestComplete tells us that we can move our xPath selectors to increase the performance. We are aware of this but do not want to do this.

Is there a way to deactivate these messages as we now only get warnings about performance?

 

2022-07-29 14_16_24-BSIAPPMAN01 - Remote Desktop Connection.png

 

Kind regards,

Luuk

7 REPLIES 7
Kitt
Regular Contributor

Can you share the exact version of TestComplete you are using (for the moderators)? In the event this is indeed a new feature you may want to post a new..new feature request to disable this in a future update [TestComplete Feature Requests]

 

For now you can just click the checkbox next to 'Warning' in your log and it will disappear. For a more permanent solution you could create a OnLogWarning Event handler to turn the log off during this warning, something like:

function EventControls_OnLogWarning(Sender, LogParams)
{
  // Check if the message includes the desired substring
  var locked = aqString.Find(LogParams.Str, "Improve your test performance");
  if (locked != -1)
  {
    // If found, block the message
    LogParams.Locked = true;
  }
  else
  {
    // Else, post the message
    LogParams.Locked = false;
  }  
}

[TestComplete reference]

[[ kITt: keep IT testing ]]
MarkHays
Occasional Contributor

Tried adding the event handler as suggested by @Kitt and it works.   Good to know that we can get around this issue that SmartBear has created.  TestComplete, should really have an option to turn off the checking of the performance and producing the error in the first place.   So, now there are checks for optimization, (that will make the current code slower for all XPath lookups).  We do not want those all the time.  It is good to have the capability, but allow us to turn them off/on as desired.

 

IMO the event handler is a work around.

Kitt
Regular Contributor

@MarkHays If you double click the message in the log does it take you to an operational step you can disable [TestComplete reference]

[[ kITt: keep IT testing ]]
MarkHays
Occasional Contributor

@Kitt it appears that this ability to enable/disable steps is for keyword tests.  We are using Scripted tests.  Is there something similar for Scripted tests that you know of?

Kitt
Regular Contributor

Apologies, I was looking at the Keyword tag you referenced and assumed you were not scripting. You can still double click on the log message and it should jump to the line of code that is failing - where you can either remove it, comment it out and retry, or refactor it depending on what it's doing. If you are scripting, then I would think you have added your own Log.Warning() logic somewhere that is positing this message. Sharing a snippet of the code may help with more appropriate suggestions.

[[ kITt: keep IT testing ]]
klabbe
Occasional Contributor

Just to let people know I have openned a case at SmartBear regarding this issue on July 29. The told be that this was an issue with the version 15.42 and they will let the dev team know about this problem. Hope it get fixed soon!

klabbe
Occasional Contributor

Thanks so much for this solution!

 

I used the following step by steps doc to create the event handler and the code written by @Kitt.

 

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/creating-handl...

 

cancel
Showing results for 
Search instead for 
Did you mean: