Is it Possible to run Ranorex Test in Background

Ask general questions here.
yassineb
Posts: 2
Joined: Wed Sep 25, 2019 9:09 am

Is it Possible to run Ranorex Test in Background

Post by yassineb » Wed Sep 25, 2019 9:20 am

Hi all
In my project, I have many regression test cases that should be automatically performed after each release. The tests take more than 2 hours. Sometimes over 12 hours.
Unfortunately, I can not perform the test with a logged off PC (I can not work on the running Time).
is there any way to run the tests in background? or any solutions? :?: :?: :?:
Thank you for the quick answer

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

Re: Is it Possible to run Ranorex Test in Background

Post by odklizec » Wed Sep 25, 2019 9:31 am

Hi,

I'm afraid, there is no way to run UI tests in background. The UI must be available so Ranorex can access the elements, which means the machine must be unlocked. The best you can do is to setup a virtual machine, which can be run 24/7 (or started when needed) and run your tests there (instead of running them on desktop PC).
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

yassineb
Posts: 2
Joined: Wed Sep 25, 2019 9:09 am

Re: Is it Possible to run Ranorex Test in Background

Post by yassineb » Wed Sep 25, 2019 10:18 am

hello and thank you for your quick response.
Too bad that it does not work out that way. :(

Another question:
    is it then possible to use the same license on VMachine? I hope we don't need for Ranorex VMachine other Licence.
      i tried to create Method, wich don't use Mouse Click and Keyboard, it works with some Elements, but with others not, what do you think about actions like this:

      /// <summary>
      /// This is a placeholder text. Please describe the purpose of the
      /// user code method here. The method is published to the user code library
      /// within a user code collection.
      /// </summary>
      [UserCodeMethod]
      public static void elementactions(RepoItemInfo element, string Texttofill)
      {
      string thiselement = element.FindAdapter<Unknown>().ToString();
      thiselement = thiselement.Substring(1);

      Report.Info(thiselement);
      if (thiselement.StartsWith("Button")){
      element.FindAdapter<Button>().Press();
      }
      if(thiselement.StartsWith("Radio")){
      element.FindAdapter<RadioButton>().Select();
      }

      if(thiselement.StartsWith("Text")){
      element.FindAdapter<Text>().PressKeys("");
      element.FindAdapter<Text>().PressKeys(Texttofill);
      }

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

      Re: Is it Possible to run Ranorex Test in Background

      Post by odklizec » Wed Sep 25, 2019 11:07 am

      Hi,

      As long as you own floating Ranorex license, you should not need another license just for VM. But of course, even with floating license, you may need multiple Rx licenses, especially if you wish to run test and developing in Ranorex studio at the same time.

      If you wish to just run your tests on VM and not to develop them there, all you need is a Ranorex runtime license. This kind of license is useful in case you want to just run tests and not to develop them. So your main Studio license is still available, while the tests can run on their own runtime license.

      As for the idea of replacing mouse-based actions, with non-mouse actions, this will not help you in your quest for running tests in background/locked machine. At first, Ranorex may still fail during the element search, because UI is not available for locked machine, therefore elements could not be found by Ranorex. And at next, actions like "press" may not invoke attached mouse-based (onmouse/onkey) events and actions. And this is most probably why some of your code lines failed?

      As mentioned in my previous post, using VM, along with some kind of continuous integration/delivery solution (like Jenkins) is the best option for running tests in "background".
      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