https://ranorex.com/forum/floating-lice ... t1970.html
Currently in Ranorex studio 9.2 we see this feature.
When there are license in use, the test suite waits till license availability and then begins execution.
However when running test suite exes using command line in pipeline, the execution fails stating license not available.
How to ensure similar behavior to be done for command line execution.
Wait for license to be available and then execute the suite.
Wait for license in Devops pipeline- Floating license
-
- Posts: 7
- Joined: Fri Aug 14, 2020 8:59 am
Re: Wait for license in Devops pipeline- Floating license
Hi,
What you need is to implement WaitForAvailableLicense method in Program.cs, as described for example here...
running-tests-on-numerous-machines-t8803.html#p35582
Hope this helps?
What you need is to implement WaitForAvailableLicense method in Program.cs, as described for example here...
running-tests-on-numerous-machines-t8803.html#p35582
Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 7
- Joined: Fri Aug 14, 2020 8:59 am
Re: Wait for license in Devops pipeline- Floating license
Hi ,
Thank you so much, will try this.
Thank you so much, will try this.
-
- Posts: 7
- Joined: Fri Aug 14, 2020 8:59 am
Re: Wait for license in Devops pipeline- Floating license
So I tried this.
I removed the license server configuration from where license was being fetched.
I created a console exe which contains the code snippet
Now i run the exe it returns license available.
However when I run Ranorex studio, it pops up the dialog to configure license or activate trial license.
After this again if i run the exe it still says license is available.
I see similar problem here
waitforvalidlicense-returns-true-even-i ... t4653.html
Can you help.
I removed the license server configuration from where license was being fetched.
I created a console exe which contains the code snippet
Code: Select all
bool licenseAvailable = Ranorex.Core.ElementEngine.WaitForValidLicense(new Ranorex.Duration(timeout * 1000), new Ranorex.Duration(checkInterval * 1000));
if (licenseAvailable)
{
System.Console.WriteLine("Yeah... license avaliable!");
return (int)ExitCode.Success;
}
else
{
System.Console.WriteLine("Doh... no license avaliable.");
return (int)ExitCode.NoLicenseAvailable;
}
However when I run Ranorex studio, it pops up the dialog to configure license or activate trial license.
After this again if i run the exe it still says license is available.
I see similar problem here
waitforvalidlicense-returns-true-even-i ... t4653.html
Can you help.
Re: Wait for license in Devops pipeline- Floating license
Hi,
So are you using floating license? And the machine where you run the test is properly configured to reach the license server? Ideally, install whole Ranorex Studio on the target machine and configure the license via license manager.
So are you using floating license? And the machine where you run the test is properly configured to reach the license server? Ideally, install whole Ranorex Studio on the target machine and configure the license via license manager.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 7
- Joined: Fri Aug 14, 2020 8:59 am
Re: Wait for license in Devops pipeline- Floating license
Yes, My problem is following.
I am running suites on virtual machines configured as azure devops pipeline agents
All of them are configured to connect to license server.
I have more vm's than licenses.
Most of times tests pass as they get license
Sporadically few suites fail stating they were not able to get license as all licenses were being used.
Hence I thought I could use this snippet to make a vm wait for license, get the license and then start executing test cases.
However the code snippet never reports that there is no license. Even though there is no license with which test suite could progress successfully.
I am running suites on virtual machines configured as azure devops pipeline agents
All of them are configured to connect to license server.
I have more vm's than licenses.
Most of times tests pass as they get license
Sporadically few suites fail stating they were not able to get license as all licenses were being used.
Hence I thought I could use this snippet to make a vm wait for license, get the license and then start executing test cases.
However the code snippet never reports that there is no license. Even though there is no license with which test suite could progress successfully.