Which Settings to change to speed up or slow down a Test Run

Ranorex Spy, Recorder, and Studio.
gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

Which Settings to change to speed up or slow down a Test Run

Post by gilbar16 » Wed Oct 28, 2015 4:42 pm

Which Ranorex Settings do you change to speed up or slow down a Test Run?

What values in seconds or milliseconds have worked well for you?

Thanks.
Gilbert

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Which Settings to change to speed up or slow down a Test Run

Post by krstcs » Wed Oct 28, 2015 6:35 pm

Honestly, the ONLY time I worry about timings is when the test is failing due to not finding an item within the timeout, and the ONLY change I make is to add more time to the item, or to put a WaitForExist/NotExist call right before the element is used.

For me, the default value of 30s usually works. I have had some individual elements work at 10s (Java app) with good XPaths.

Part of the answer to questions like this relies on knowing why someone wants to change the timings. If they are trying to speed up their tests, my question is usually "Why?" If they are sitting and waiting for it to finish, then they are doing automation wrong. :D The whole point is to accomplish some task without human intervention or waiting. If they are concerned about performance, then they should be using a performance test tool, not Ranorex (or any other Function GUI automation tool for that matter). If they have items that are timing out, maybe they should adjust the timeouts for just those elements.

Remember that the default timeout is the LONGEST amount of time that Ranorex will spend searching for an item BEFORE IT THROWS A 'NOT FOUND' EXCEPTION. The only thing that lowering the timeout does is to make it FAIL FASTER. Ranorex will take some amount of time to find the object, if it is available, no matter what timeout you set. If Ranorex takes 1.5s to find object X, then it will take that same 1.5s no matter the timeout. The timeout only matters if the object is NOT FOUND before it expires.

So, I usually just say, "Don't worry about timings unless the test is failing."

But, that's just me...
Shortcuts usually aren't...

gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

Re: Which Settings to change to speed up or slow down a Test Run

Post by gilbar16 » Thu Oct 29, 2015 6:29 pm

Good points, krstcs.
The main reason I asked is for Demo purposes only.
Duration defaults to 500ms or Move Time is showing default of 300ms and on Play mode, it seems to be kind of slow so if you are showing your automated scripts to some people, I think for sure they ask you why is the test tool clicking on buttons or entering text so slowly.

Which Settings controls the speed of the mouse clicks and text entries?

Thanks.
Gilbert

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Which Settings to change to speed up or slow down a Test Run

Post by krstcs » Thu Oct 29, 2015 6:34 pm

Ah, and that's why I ask "Why?" :D

So, I usually don't worry about it for demos either. However, one thing you can do, if you are just running one module as a demo, is set Turbo Mode to on (at the top of the Recording Module edit window, just click it). This will set all delays to 0ms.

Caution though: if you still have asynchronous mouse/keyboard event dispatch turned on, this could cause issues where a field is not completely finished being typed in when you try to click the next button...



I think most people actually will prefer having the delays in the demo because they will be able to follow the "action" more easily. Remember, the computer can do things much, much faster than we can comprehend them. And, one of the biggest problems with demos (or any presentation, for that matter) is going too fast. Let people catch up.

Hope that helps!
Shortcuts usually aren't...

gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

Re: Which Settings to change to speed up or slow down a Test Run

Post by gilbar16 » Thu Oct 29, 2015 8:03 pm

Yes, that explanation of yours help. Thanks.