Floating License: Wait for license : Automation API

Floating License: Wait for license

Class library usage, coding and language questions.

Floating License: Wait for license

Postby hschmitt » Tue Feb 15, 2011 5:26 pm

Hi,
we are using Ronarex with floating license model.
Hudson as CI Server executes our Ranorex NUnit tests on several machine configurations.
If there is no license available the test fails and the build is marked as "failed".
Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?
hschmitt
 
Posts: 3
Joined: Tue Feb 15, 2011 4:56 pm

Re: Floating License: Wait for license

Postby Support Team » Wed Feb 16, 2011 9:18 am

Hi,

hschmitt wrote:Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?

Sorry but this is not possible at the moment. The only public property for the License is the Ranorex.Core.ElementEngine.IsLicnesed, but i think this won't help you out.

But is it not possible in Hudson to start the executable on a specific time?
Then i would use this property to start your executable successive.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Floating License: Wait for license

Postby hschmitt » Wed Feb 16, 2011 6:42 pm

Support Team wrote:Hi,

hschmitt wrote:Is there a way to wait (C# or within NAnt) for our test execution until a license becomes available?

Sorry but this is not possible at the moment. The only public property for the License is the Ranorex.Core.ElementEngine.IsLicnesed, but i think this won't help you out.

But is it not possible in Hudson to start the executable on a specific time?
Then i would use this property to start your executable successive.

Regards,
Peter
Ranorex Team
Sure it is possible to start each OS we want to test at a specific time, but if there is no license left, the build fails. And we have to start it again manually.
But could a seperate executable an option with code like this
Code: Select all
while(!Ranorex.Core.ElementEngine.IsLicensed && timeoutNotReached) {
  try {
    //Ranorex Operation that triggers license check
  } catch(Exception e) {
    //Wait a bit
    continue;
  }
  break;
}

Which operation would you suggest? It should be one, that never fails when a valid license is available.
hschmitt
 
Posts: 3
Joined: Tue Feb 15, 2011 4:56 pm

Re: Floating License: Wait for license

Postby artur_gadomski » Thu Feb 17, 2011 10:17 am

It would be nice feature if Ranorex could hold and wait for floating licence to become available.
We could specify a timeout and frequency of checks.
User avatar
artur_gadomski
 
Posts: 125
Joined: Mon Jul 19, 2010 7:55 am
Location: Copenhagen, Denmark

Re: Floating License: Wait for license

Postby Support Team » Thu Feb 17, 2011 10:31 am

Hi,

I talked to our lead developer for licensing and he told me, this is only working with node locked licenses. So your code above won't work. But I will add a feature request to our internal bug tracking system and in a future release of Ranorex there will be a method or a option in our UI to set this flag.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Floating License: Wait for license

Postby Support Team » Wed Apr 13, 2011 3:59 pm

We will add the feature to wait for a valid license to become available with Ranorex V3.0.2 in terms of the ElementEngine.WaitForValidLicense method.

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests