Wait for action is inefficient

Bug reports.
lkovacsik
Posts: 4
Joined: Wed May 09, 2018 8:58 am

Wait for action is inefficient

Post by lkovacsik » Wed May 09, 2018 10:16 am

Hello,
I am new in Ranorex, however I am afraid behavior of Wait for action is incorrect.

The situation is as follows:
1. Software Under Test is started
2. SUT opens a database file
3. Database file should be upgraded by SUT ocdassionally, in this case confirmation is given in a dialog box
4. Database file is saved
5. SUT is closed

Processing times of open, upgrade, save processes are very long in case of great database files, and meantime maybe application is not responding. Therefore I tried to use Wait for actions with a long (3m) timeout.

My experience is that execution is continued before wait timeout is expired. The result is that execution is stopped randomly in case of great database files.

Since time of those long processes is always under 1.5 minute I made several trials, each with 3 minutes as Wait timeout value:
Wait for Exist,
Wait for AttributeContains Visibility is Visible,
Wait for AttributeNotContains AppHung is True,
Wait for AttributeNotContains Text "(not responding)"
Wait for AttributeContains Title is <variable of test case>

Moreover I tried to combine these Wait for actions by enabling continue on fail. By this way I could handle some great databases but I did not find in general a correct resolution of the problem: Wait timeout is not awaited in those cases. If continue on fail is not enabled, test run is terminated by "Exception of type 'Ranorex.ApplicationNotRespondingException' was thrown."

Last time test run was terminated because Wait for existing TitleBar was unsuccessful. Elapsed time between Waiting for and Error is no more than 6 seconds while 3 minutes is defined as Waiting time! (See attachment.) The actions after Save are attached too.



My device specifications are:
Intel(R) Core(TM) ir CPU 760 @ 2.80GHz
16.0 GB RAM,
SSD
Windows 10 Pro version 1709, OS Build 16299.371

Ranorex version is .1.1+git.4526ebf7
.NET Runtime version: 4.0.30319.42000
Attachments
Close_Editor.zip
Ranorex log + actions leading to error
(173.59 KiB) Downloaded 8 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Wait for action is inefficient

Post by odklizec » Wed May 09, 2018 11:30 am

Hi,

The attached zip contains rxlog file, but this is unfortunately not enough. Please upload either the rxzlog (compressed report file) or upload missing files, required to open rxlog (*.rxlog.data, RanorexReport.css and RanorexReport.xsl plus any "image" folder related to the report).

In my opinion, if the waitfor exists (any waitfor action) terminates before the timeout value, then it's most probably because of fulfilled waitfor condition? In other words, the title bar you are waiting for, is most probably "visible" for Ranroex and hence the waitfor action is terminated?

Unfortunately, it's hard to suggest something definitive without seeing your app under test and your test. But generally speaking, waitfor action appears to be pretty reliable. I'm using it in all my tests (a lot) and some of my tests runs for several hours. So I consider it pretty stable and reliable. Maybe you will have to wait for another element, which is a better indicator that the DB operation finished?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

lkovacsik
Posts: 4
Joined: Wed May 09, 2018 8:58 am

Re: Wait for action is inefficient

Post by lkovacsik » Thu May 10, 2018 8:40 am

Hello,

Please find the related *.rxzlog file in the attachment.

I hope it will hold enough information about the problem.

About the Wait for actions:
I could temporary resolve the problem by using multiple Wait for actions one after the other by Enable continue on fail setting.
If I Disable continue on fail then execution stops with error without waiting for timout expiration. So I think your opinion is a mistake in this case. Ex.:
Action is: Wait for Exists 3m TitleBar
Error is: Failed to wait for item to exist.
Exception of type 'Ranorex.ApplicationNotRespondingException' was thrown.

In this case Title bar was not existing under Ranorex but error message was given within 6 seconds. Conclusion: given 3 munutes long timeout was not awaited.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Wait for action is inefficient

Post by odklizec » Thu May 10, 2018 8:43 am

Hi,

It seems you forgot to attach the rxzlog file? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

lkovacsik
Posts: 4
Joined: Wed May 09, 2018 8:58 am

Re: Wait for action is inefficient

Post by lkovacsik » Thu May 10, 2018 10:23 am

Hi,

Let me send another example about Wait for action problem:
I have to test a software which is started as follows:
1) Konfigurationstool Anmeldung (log in)
2) Iltis Anmeldung (log in)
3) Several test cased after successful log in.

Before point 1) Iltis Anmeldung the Konfigurationstool is responsible for starting several components. It is a time consuming phase, it takes about 1 minute long. Point 2) Iltis Anmeldung is possible only after this initialization phase.

I attached three kinds of methods and their related result:
A) There is a Wait for action applied to wait existence of Iltis Anmeldung window (GmWindow). The result is always error. Log in is impossible. See Iltis_log_in-with_Wait_for in attachment.
B) There is a Delay action applied to wait end of initialization process before Iltis Anmeldung window (GmWindow) is generated. The result is always success. Log in is executed. See Iltis_log_in-with_Delay in attachment.
C) The combination of the two preceeding methods: A Delay action is preceding the Wait for action. Of course the result is always success. Log in is executed.

I think method A) should be successful too since Wait timeout is set to 2 minutes (while Delay timeout is only 1 minute). Instead 12 seconds after start of Wait for action an exception is thrown by Ranorex and generation of GmWindow is not recognised after a duration of appr. 1 minute.
Attachments
Delay_vs_Wait_for.zip
(1.39 MiB) Downloaded 10 times

lkovacsik
Posts: 4
Joined: Wed May 09, 2018 8:58 am

Re: Wait for action is inefficient

Post by lkovacsik » Thu May 10, 2018 10:28 am

Hi,

The forgotten rxzlog is now really attached. :-)
(It was too big and I didn't check the result of upload.)
Attachments
SBB_Stazionen_20180508_174923.zip
(558.22 KiB) Downloaded 9 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Wait for action is inefficient

Post by odklizec » Thu May 10, 2018 12:12 pm

Hi,

Thanks for the report.

I think the solution of your issue with waitfor action could be increasing of functionexecutiontimeout value, as described here:
https://www.ranorex.com/forum/about-app ... tml#p46091
Default value is 5000ms, which is probably not enough for your app under test?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration