Unified Functional Testing Practitioners Forum

QTP license server connection timeout

Super Contributor

QTP license server connection timeout



I am running 10 QTPs using the concurrent license mode.


Is there any where that i can configure a user timeout so that any inactive QTP connection will be automatically disconnected from the license server , freeing up the licenses for others?



Pls advise.





Trudy Claspill
Honored Contributor

Re: QTP license server connection timeout


I asked the same question of HP support. They explained that an instance of QTP will keep renewing its license from the Concurrent License Server as long as QTP is running, regardless of whether it is actively being used.

It looks like the license keys themselves can be configured (when you request the license from HP) with a lifetime value, but this actually has no effect. The QTP app itself is designed to keep renewing its concurrent user license forever.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
Regular Collector

Re: QTP license server connection timeout



You can create a QTP launcher, and ask anyone to start QTP using it.

This launcher can monitor QTP process (QTPro.exe) for memory and CPU (E.g. get values every 2 sec), and after pre-defined timeout that there was no change in memory, it is clearly that this instance is idle, and can be "killed".


To be more polite, it is recommended to use QTP com object and save current work before killing QTP process, or at least pop-up a big message box that QTP is about to be killed in about 5 minutes.


Good luck,


Acclaimed Contributor

Re: QTP license server connection timeout [Solved]

strComputer ="."
Set wshShell =wscript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Process",,48)
For Each objItem in colProcesses
if objItem.Name <> "Idle"  and objItem.Name <> "_Total" then
        If instr(objItem.Name,"UFT")<>0 and objItem.PercentProcessorTime < 5 Then
           wshShell.Run "taskkill /f /im UFT.exe", , True
           Exit for
        End if
End if

You can use wait or sleep accordingly

//Add this to "OnDomLoad" event