UFT’s Runtime Engine

UFT Run-time Engine

UFT’s runtime engine allows you to run the API and GUI tests including BPT Tests without installing the complete UFT IDE. Machines with runtime engine can be used as the execution only machines. Even Run results Viewer is not required to be installed on the machine.

Run time engine will be beneficial for the any kind of executions which where you are trying to run your tests from an external source or on an execution only machine, like one used by the developers for building the new code and executing the Unit tests, or when you use Jenkins or ALM for the executions of the tests.

Installation

Run-time engine is one of the option within the UFT setup window during installation

UFT Runtime engine installation

You can choose to only install the runtime engine and skip the installation of the UFT GUI. This will only allow you to execute the scripts on a machine.

How to change settings for the runtime engine

Goto Start->All programs->HP Software->HP Unified Functional Testing->Tools->Runtime Engine

UFT Runtime Engine

What you can configure in settings

You can change the following settings

  • Addins
  • Run Options
  • Run Results Export Options
  • Remote Connection options
  • Web and Windows Application options

Installing License for running the tests using runtime Engine

There are two ways for installing the License for Runtime Engine

  • Using GUI : Goto Start->All programs->HP Software->HP Unified Functional Testing->Tools->License Installation wizard
  • Using Command Line

1. Seat

“<UFT installation directory>\bin\HP.UFT.LicenseInstall.exe” seat “<license key string>”/seat “<path to the license key file”

2. Concurrent

“<UFT installation directory>\bin\HP.UFT.LicenseInstall.exe” concurrent <license ID> <license version> <server    name/address> [<redundant server name/address>] [/force]

Executing tests using runtime engine

Basically UFT runtime engine will allow you to execute the scripts using the UFT’s AOM. So, you can use the below scripts to execute the tests

Set OUFT = CreateObject(“QuickTest.Application“) ‘ Create the application object
OUFT.Visible = False
OUFT.Launch ‘Start UFT
OUFT.Open “C:\UFTGuiTest1
OUFT.Test.Run Nothing, true, False
OUFT.Quit

Importing and exporting runtime engine settings

Runtime engine settings can be exported and imported from one machine to another machine. its same as exporting ad applying UFT settings using the vbs file.

Exporting Settings

To Export the settings  Click on Export Runtime Engine Settings  button and you can save the settings in the vbs file. This vbs file will look like this


On Error Resume Next

Dim App
Set App = CreateObject("QuickTest.Application")
App.Visible = False
If App.Launched Then
WScript.Echo("The UFT application is still running. Close it before changing your settings.")
WScript.Quit
End If

App.SetActiveAddins Array("Web"), errorDescription
App.Launch
App.Options.TextRecognitionOrder = "OCROnly"
App.Options.TextRecognitionBlockType = "Multiple"
App.Options.TextRecognitionLanguages = "English"
App.Options.Run.ViewResults = True
App.Options.Run.AllowOtherHpProductsRun = True
App.Options.Run.RunMode = "Normal"
App.Options.Run.ImageCaptureForTestResults = "OnError"
App.Options.Run.MovieCaptureForTestResults = "Never"
App.Options.Run.MovieSegmentSize = 2048
App.Options.Run.SaveMovieOfEntireRun = False
App.Options.Run.StepExecutionDelay = 0
App.Options.Run.ReportFormat = "HTML"
App.Options.Run.EnableRdp = False
App.Options.Run.RdpUserName = ""
App.Options.Run.RdpPasswordEncrypted = "0SWoxfcgI8AwDTlJKrk8aA=="
App.Options.Run.AutoExportReportConfig.AutoExportResults = False
App.Options.Run.AutoExportReportConfig.StepDetailsReport = True
App.Options.Run.AutoExportReportConfig.DataTableReport = True
App.Options.Run.AutoExportReportConfig.LogTrackingReport = True
App.Options.Run.AutoExportReportConfig.ScreenRecorderReport = True
App.Options.Run.AutoExportReportConfig.SystemMonitorReport = True
App.Options.Run.AutoExportReportConfig.ExportLocation = ""
App.Options.Run.AutoExportReportConfig.UserDefinedXSL = ""
App.Options.Run.AutoExportReportConfig.StepDetailsReportType = "HTML"
App.Options.Run.AutoExportReportConfig.StepDetailsReportFormat = "Short"
App.Options.Run.AutoExportReportConfig.ExportForFailedRunsOnly = True
App.Options.WindowsApps.ForceEnumChildWindows = False
App.Options.WindowsApps.ClickEditBeforeSetText = False
App.Options.WindowsApps.UseKeyboardToPerformSet = False
App.Options.Web.BrowserCleanup = False
App.Options.Web.RunOnlyClick = False
App.Options.Web.RunUsingSourceIndex = False
App.Options.Web.RunMouseByEvents = True
App.Folders.RemoveAll

If Err Then
WScript.Echo("Error: " & CStr(Err.Number) & " " & Err.Description & vbCrLf & "Source: " & Err.Source)
End If
App.Quit

Now if you observe carefully, HP has done some changes to the above code. There is a condition for error handling. If you are running this script from jenkins or some other source, it might not run properly, because of the Wscipt.Echo function. You should comment it, or make sure that you have it handled in some way.

Exporting Settings

To Import these settings, click on the Import button Import Runtime Engine Settings . Once the import is done, same settings should reflect on the runtime engine of the machine.

You can utilize runtime engine for running the tests from

  • ALM
  • Automation object model
  • Jenkins Plugin
  • Test Batch Runner
  • Silent Test Runner

Thanks,
Sumeet Singh Kushwah

20 responses to “UFT’s Runtime Engine

  1. Hello Sumeet,
    Thanks for your Informative Post, I have installed HP UFT in my machine and would like to run Tests ( But after the installation of my concurrent license). I am not able to invoke HP UFT from the command line using a .vbs file ( I had tried it as an administrator and it fails as well)

    It complains the following “Neither QTP or UFT license is installed”, Can you please advise?

    Liked by 1 person

    • Hi,

      I tried invoking UFT 12.5 and its working fine, If you are getting this error then your license is not set properly. Have you tried running UFT as admin when you are setting the license ?

      Also when you re-open the UFT, are getting the the dialog box for re-installing the license ?

      Like

  2. Hello Sumeet, Thank you for replying , No it does not ask me to install license when i open UFT GUI, My license in installed in a VM and i connect to it (license validation happens) everytime when i open UFT in the background.

    Like

  3. “Basically UFT runtime engine will allow you to execute the scripts using the UFT’s AOM. So, you can use the below scripts to execute the tests”

    Where do i find UFT’s AOM?

    Liked by 1 person

  4. Hi Summet,
    I have 10 scripts but all these scritps would like Run on Non-GUI mode and also that scripts should integrate with Jenkinns

    Like

  5. Is it necessary for the slave system to have UFT installed in order to execute using the Runtime engine?
    If yes, then where should we provide the details while configuring the runtime engine?

    Like

    • No it’s not necessary to install full UFT. You can just install UFT runtime engine on the slave machine.. When you install runtime engine only, you will have to start the UFT runtime from program files and then change the runtime settings from the Windows task bar.

      Like

  6. I am also getting this error while running the script in runtime engine
    “Neither QTP or UFT license is installed”, Can you please advise?
    Same is working fine for admins.license type is concurrent license.
    Is there any permission changes required in component services?

    Like

  7. Im getting this error while trying to run scriptsw from ALM using UFT 11.5 . Below is the error. Can abyone please suggest how to go about it.
    Message box Title is: Microsoft Visual C++ Runtime Library
    Message is :
    Runtime Error
    “Program C:\Program Files\Mercury Interactive\Quickest Professional\ bin \ AQTRmtAgent.exe”

    Thanks in advance

    Like

  8. anyone please tel how to fix “system.servicemodel.channels.servicechannel cannot be used for communication” when invoking uft 12.51 thru vbs

    Like

  9. We have a hybrid framework and we are using UFT 11.53. Currently in our framework a vbs file invokes UFT, the driver script gets loaded in the UFT IDE and execution kicks off.
    However, since the IDE consumes a lot of time to load and a lot of memory to run, we are thinking of a way to execute the scripts without launching the IDE. Could UFT Runtime Engine serve this purpose?

    Like

  10. Thanks for your post! I am wondering if using RTE will helps in running UFT test on remote host even if Remote host was locked out.
    My objective is to run test on remote host when no one is logged in to the system (ofcourse machine is up and running, but it is locked)

    Like

  11. how to Stop, Pause and Continue the execution od Runtime Engine?
    I tried using AOM scripts i.e., creating a shorcuts for them. But it doesn’t work

    Like

  12. I am using UFT version 14.51 I want to install main UFT setup on Citrix server and then use its instance on VMware machines for record and run is it possible and what are steps?

    Like

Leave a comment