Running tests on numerous machines

Ask general questions here.
IvanBrowsky
Posts: 2
Joined: Wed Nov 25, 2015 10:21 am

Running tests on numerous machines

Post by IvanBrowsky » Wed Nov 25, 2015 10:29 am

Hi, I've read other threads, explaing HOW do it, only question left is that we have floating license, and can I run tests without using studio but with just coping required dlls and license on >=2 machines simultaneously without any further license problems? Can be studio run same time on 1 machine, while other executing tests with method described before?

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

Re: Running tests on numerous machines

Post by odklizec » Fri Nov 27, 2015 8:41 am

Hi,

To be able to run your tests simultaneously on multiple PCs, you need equal number of licenses (equal to number of PCs). If you have just one floating license, you can run just one test at a time.

In a reality, you will never have enough licenses ;) In this case, it's good to add some kind of "wait for available license" method, which will make your tests to wait for next available license. Such method must be used as a very first action in Program.cs.
I'm using something like this...

Code: Select all

		/// <summary>
		/// This method checks and waits for available RX license
		/// </summary>
		/// <param name="WaitForLicenseTimeout">wait time for available license (before giving up)</param>
		/// <param name="WaitForLicenseInterval">license check interval</param>
		/// <returns></returns>
		public static int WaitForAvailableLicense(int WaitForLicenseTimeout, int WaitForLicenseInterval)
		{
			System.Console.WriteLine("Waiting for available Ranorex license...");
			bool RXLicenseAvailable = Ranorex.Core.ElementEngine.WaitForValidLicense(new Ranorex.Duration( WaitForLicenseTimeout), new Ranorex.Duration(WaitForLicenseInterval));
			if (RXLicenseAvailable)
			{
				System.Console.WriteLine("Ranorex license found OK!");
				return 1;                    
			}
			else
			{
				System.Console.WriteLine("No Ranorex license available! (waited " + TimeSpan.FromMilliseconds(WaitForLicenseTimeout).TotalMinutes.ToString() + " mins)");
				return 0;
			}
		}
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

IvanBrowsky
Posts: 2
Joined: Wed Nov 25, 2015 10:21 am

Re: Running tests on numerous machines

Post by IvanBrowsky » Mon Nov 30, 2015 10:21 am

Oh, never thought such method exists, time to read docs a little more :wink: Thanks for info.