Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Absent Member.. dave2000 Absent Member..
Absent Member..
207 views

Can run mode be set programmatically?

Jump to solution

We would like to override the default run mode setting of "Fast" so that the tests run a little slower. 

 

This is because UFT seems much quicker than QTP and is often faster than the web site we are testing (we would rather have consistent reliable tests than super-speedy tests that work some of the time against the AUT).

 

The setting doesn't seem to be maintained between sessions in UFT and Fast seems to be the default.  Can this be set in code?

 

Cheers

 

Dave

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: Can run mode be set programmatically?

Jump to solution

Hello Dave,

 

   If you are executing tests from ALM/QC you can use the steps below to set it to normal mode.

   1-Open the "mic.ini" file from the <QuickTest Professional>/bin directory.
   2-Find the "[RemoteAgent]" section.
   3-Enter the following entry to this section:.

      RunInFastMode=0

   4-Save and close the mic.ini file.
   5-Close the QuickTest Professional Remote Agent system tray tool.
   6-If changes aren't effective, reboot the machine.

 

   You can use Automation Object Model (AOM) of UFT to open the test and set the mode you want to run it using UFTobject.Options.Run.RunMode = "Normal"

 

    

   The below is a sample of how to run a test in normal mode:

 

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.CaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Normal"
qtApp.Options.Run.ViewResults = False
qtApp.Open "C:\Temp\GUITest1", True ' Open the test in read-only mode
qtApp.Test.Run 
Set qtResultsOpt = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object

 

Regards.

HP support

If you find that this or any post resolves your issue, mark it as an accepted solution.

 

Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

 

0 Likes
2 Replies
Highlighted
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: Can run mode be set programmatically?

Jump to solution

Hello Dave,

 

   If you are executing tests from ALM/QC you can use the steps below to set it to normal mode.

   1-Open the "mic.ini" file from the <QuickTest Professional>/bin directory.
   2-Find the "[RemoteAgent]" section.
   3-Enter the following entry to this section:.

      RunInFastMode=0

   4-Save and close the mic.ini file.
   5-Close the QuickTest Professional Remote Agent system tray tool.
   6-If changes aren't effective, reboot the machine.

 

   You can use Automation Object Model (AOM) of UFT to open the test and set the mode you want to run it using UFTobject.Options.Run.RunMode = "Normal"

 

    

   The below is a sample of how to run a test in normal mode:

 

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.CaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Normal"
qtApp.Options.Run.ViewResults = False
qtApp.Open "C:\Temp\GUITest1", True ' Open the test in read-only mode
qtApp.Test.Run 
Set qtResultsOpt = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object

 

Regards.

HP support

If you find that this or any post resolves your issue, mark it as an accepted solution.

 

Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

 

0 Likes
Absent Member.. dave2000 Absent Member..
Absent Member..

Re: Can run mode be set programmatically?

Jump to solution

Hi

 

Thanks for the reply.  That's what I wanted - the code:

 

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Options.Run.RunMode = "Normal"
Set qtApp = Nothing
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.