Page 1 of 1

Long delay problem - any issues known?

Posted: Mon Dec 07, 2015 9:00 am
by BCTest
Hello,
we noticed some strange behavior for the last tests, first some explanations:
  • * our tests will be executed one by one
    * the whole test-run lasts about 12 hours, it starts most of the days at about 17:00 and some days at about 14:00, but it differs any day
    * during the whole test-run in some test-cases the correct use of the current date will be checked
    * the following behavior problem could be reproduced using Ranorex 5.4.4 and 5.4.2 on Win 7 SP1
To avoid a change of the current date in a test-case during the whole test-run we added a delay in those test-cases if midnight is close. Our longest test-case without a date-change took 11 minutes so we increased the delay from 10 to 20 minutes.
Since this change we noticed a strange behavior: when the delay is more than 13 minutes (it could be also 10 minutes?) Ranorex seemed not to be able to focus on the correct windows any more. Each test-case after this delay failed because the key-sequence were not sent to the correct dialog or the buttons won't be clicked.
Starting a program using RunApplication worked each time but none of the following actions:
  • * Activate windows
    * Focus windows
    * Click on windows-title
    * CloseApllication
Any suggestions what I could look for to avoid this problems? Any known issues I didn't find in this forum?

And last: when we started the tests earlier and no date change occurred while executing all test-cases worked fine.

This is the code to activate and focus the program:
public void BeendeCOL()
        {
            const int verzoegerung = 5;
            int zaehler = 0;

            Report.Screenshot("COL wird beendet", repo.NemoMain.Self);

            do
            {
                if (repo.NemoMain.SchliessenInfo.Exists())
                {
                    Report.Info("TIS", "Einfacher Maus-Links-Klick auf die Titelzeile der COL");
                    repo.NemoMain.Titel.Click();

                    Report.Info("TIS", "COL wird aktiviert");
                    repo.NemoMain.Self.Activate();

                    Report.Info("TIS", "COL erhält Fokus");
                    repo.NemoMain.Self.Focus();

                    Report.Screenshot("Einfacher Maus-Links-Klick auf Schließen-Taste", repo.NemoMain.Schliessen, true);

                    repo.NemoMain.Schliessen.Click();
                }
  
                Report.Info("TIS", string.Format("Warte {0} Sekunden auf Ende von TIS: {1}. Versuch", verzoegerung, ++zaehler));
                Delay.Seconds(verzoegerung, false);
            }
            while ((repo.NemoMain.SelfInfo.Exists()) && (zaehler < 12));
            
            Validate.AreEqual(repo.NemoMain.SelfInfo.Exists(), false, "COL beendet");
        }
And so it looks like for each repeat till the counter counts to 12: the button wasn't clicked.
images_TIS_TIS_1_rxlog.jpg

Re: Long delay problem - any issues known?

Posted: Thu Dec 10, 2015 12:54 pm
by Support Team
Hello BCTest,

I'm not exactly sure if I understand you correctly. Some of your elements cannot be executed after a big delay in an over night run?
Can you also reproduce the issue with a sample application (for example Windows calculator) which does not run for 12 hours?
How does your report look like? Is it possible to share the report and your solution?Do you use a time stamp in your test?

Regards,
Bernhard

Re: Long delay problem - any issues known?

Posted: Fri Dec 11, 2015 9:37 am
by BCTest
Hello Bernhard,

this behaviour lasts for some days and is now not reproducible.
The issue was this inactive button which Ranorex could not click. Although Ranorex should click on the titlebar, activate and focus this application it still was inactive and not clickable.
I increased the duration-time of the windows machine which executes the test to hibernate from 10 to 30 minutes. Could it be that Ranorex can not activate an application if the system is in hibernate-mode?

Regards,
Thomas.

Re: Long delay problem - any issues known?

Posted: Fri Dec 11, 2015 2:48 pm
by krstcs
Ranorex cannot do ANYTHING if the system is in hibernate mode. No software can do anything if the system is in hibernate mode.

In addition, Ranorex cannot function properly if the system is locked.

Ranorex requires a fully realized, unlocked desktop in order to operate.