Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to close/restart UFT in "Not responding" status with AOM script
#1
Not Solved
Hi,

I use a UFT project several times for performance test, and I use this AOM script to execute the test 100 iterations, to reduce the UFT load memory, the script will stop and run again UFT each 10 iterations. But in some case , UFT is in "Not Responding" status( Launched but not responding) during the test, and it fails. How can I resolve this issue?

The AOM script is:

Dim qtApp,qtTest, i 
'Create a QuickTest Professional AOM object
Set qtApp = CreateObject("QuickTest.Application")
If Not qtApp.Launched then
StartUFT()
end if

set qtTest = qtApp.Test ' Get access to the test
' Get the current value of the "it_start" environment variable. This is the iteration start index.
itstart = qtTest.Environment.Value("it_start")
' Get the current value of the "it_stop" environment variable. This is the iteration stop index.
itstop = qtTest.Environment.Value("it_stop")
For i = CInt(itstart) To CInt(itstop)

If i Mod 10 = 0 Then
CloseUFT()
End If
If Not qtApp.Launched then
StartUFT()
set qtTest = qtApp.Test
end if
qtTest.Run
Next
CloseUFT()
Set qtTest = Nothing
Set qtApp = Nothing

Function StartUFT()
    qtApp.Launch
qtApp.Visible = True
qtApp.Open "<Path>" 'name of the start up script
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
 End Function
 
 Function CloseUFT()
qtTest.Close
qtApp.quit
 End Function
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Zoom in and Zoom Out for Chrome using VB script or UFT srikanthbura 1 2,509 09-07-2018, 02:01 PM
Last Post: Ankur
  "UFT has stopped working" is displayed during running the script kotaramamohana 0 1,197 08-24-2018, 01:07 PM
Last Post: kotaramamohana
Question Is Reporter ignoring the status of steps? dlaureano 3 3,410 06-05-2014, 01:38 PM
Last Post: Jay
  Restart the script in qtp arpan 1 2,090 06-24-2013, 11:22 PM
Last Post: arpan
  Write Status of each row in DataTable dlaureano 2 3,249 11-29-2012, 05:53 PM
Last Post: dlaureano

Forum Jump:


Users browsing this thread: 1 Guest(s)