Changing Run Events on option Execution Settings Using OTA

Is it possible to change the "execution settings" and "Run Events" tab for each step using OTA? I have not found the table or object that can change these properties.
Our goal is to run dawn tests automatically. We have over 2000 test cases that need to be changed.

Tags:

Parents
  • Run Settings
    =========
    
    Dim App 'As Application
    Set App = CreateObject("QuickTest.Application")
    App.Launch
    App.Visible = True
    App.Options.DisableVORecognition = False
    App.Options.AutoGenerateWith = False
    App.Options.WithGenerationLevel = 2
    App.Options.TimeToActivateWinAfterPoint = 500
    App.Options.SaveLoadAndMonitorData = False
    App.Options.TextRecognitionOcrMechanism = "Abby"
    App.Options.AbbyOcrLanguages = "English"
    App.Options.TesseractOcrLanguageData = "eng"
    App.Options.TesseractOcrWhitelist = ""
    App.Options.TesseractTessdata = "C:\Program Files (x86)\HP\Unified Functional Testing\dat\tessdata"
    App.Options.TextRecognitionBlockType = "Multiple"
    App.Options.TextRecognitionImagePreprocessing = False
    App.Options.DisplayKeywordView = True
    App.Options.AutoParameterizeSteps = False
    App.Options.AutoParameterType = "Data Table"
    App.Options.TesseractOcrTesseractOnlyMode = False
    App.Options.TesseractOcrConfigMode = 1
    App.Options.TesseractOcrConfigFile = 
    App.Options.ActiveScreen.CapturedFilesStorage = "Compressed"
    App.Options.ActiveScreen.CaptureLevel = "Partial"
    App.Options.ActiveScreen.Web.CaptureOriginalHTMLSource = True
    App.Options.ActiveScreen.Web.ActiveScripts = "Automatic"
    App.Options.ActiveScreen.Web.LoadImages = True
    App.Options.ActiveScreen.Web.LoadJavaApplets = False
    App.Options.ActiveScreen.Web.LoadActiveXControls = False
    App.Options.ActiveScreen.Web.LoadingTimeout = 30
    App.Options.Run.ImageCaptureForTestResults = "OnError"
    App.Options.Run.MovieCaptureForTestResults = "Never"
    App.Options.Run.MovieSegmentSize = 2048
    App.Options.Run.RunMode = "Normal"
    App.Options.Run.SaveMovieOfEntireRun = True
    App.Options.Run.StepExecutionDelay = 0
    App.Options.Run.ViewResults = False
    App.Options.Run.AllowOtherHpProductsRun = 0
    App.Options.Run.EnableRdp = False
    App.Options.Run.RdpUserName = ""
    App.Options.Run.RdpPasswordEncrypted = ""
    App.Options.Run.ReportFormat = "HTML"
    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.Run.ScreenRecorder.DeactivateShowWindowContents = True
    App.Options.Run.ScreenRecorder.RecordSound = False
    App.Options.Run.ScreenRecorder.SetPlainWallpaper = True
    App.Options.WindowsApps.AttachedTextRadius = 35
    App.Options.WindowsApps.AttachedTextArea = "TopLeft"
    App.Options.WindowsApps.ExpandMenuToRetrieveProperties = True
    App.Options.WindowsApps.NonUniqueListItemRecordMode = "ByName"
    App.Options.WindowsApps.RecordOwnerDrawnButtonAs = "PushButtons"
    App.Options.WindowsApps.ForceEnumChildWindows = 0
    App.Options.WindowsApps.ClickEditBeforeSetText = 0
    App.Options.WindowsApps.VerifyMenuInitEvent = True
    App.Options.WindowsApps.UseKeyboardToPerformSet = 0
    App.Options.Web.AddToPageLoadTime = 10
    App.Options.Web.RecordCoordinates = False
    App.Options.Web.RecordMouseDownAndUpAsClick = False
    App.Options.Web.RecordAllNavigations = False
    App.Options.Web.RecordByWinMouseEvents = ""
    App.Options.Web.BrowserCleanup = False
    App.Options.Web.RunOnlyClick = False
    App.Options.Web.RunMouseByEvents = True
    App.Options.Web.RunUsingSourceIndex = False
    App.Options.Web.EnableBrowserResize = True
    App.Options.Web.PageCreationMode = "Description"
    App.Options.Web.CreatePageUsingUserData = "Get Post"
    App.Options.Web.CreatePageUsingNonUserData = ""
    App.Options.Web.CreatePageUsingAdditionalInfo = True
    App.Options.Web.FrameCreationMode = "Description"
    App.Options.Web.CreateFrameUsingUserData = "Get Post"
    App.Options.Web.CreateFrameUsingNonUserData = ""
    App.Options.Web.CreateFrameUsingAdditionalInfo = True
    App.Options.Web.UseAutoXPathIdentifiers = True
    App.Options.Web.EnableWebRoleBasedKit = True
    App.Folders.RemoveAll
    App.Folders.Add("C:\systems-testing\projects\Automation\UFT\Functions\Library Functions")
    App.Folders.Add("C:\systems-testing\projects\Automation\UFT\Functions\Application Functions")
    App.Folders.Add("C:\systems-testing\projects\Automation\UFT\RecoveryScenarios")

    Test Settings

    Dim App 'As Application
    Set App = CreateObject("QuickTest.Application")
    App.Launch
    App.Visible = True
    App.Test.Settings.Launchers("Web").Active = False
    App.Test.Settings.Launchers("Web").Browser = "IE"
    App.Test.Settings.Launchers("Web").Address = "http://newtours.demoaut.com "
    App.Test.Settings.Launchers("Web").CloseOnExit = True
    App.Test.Settings.Launchers("Windows Applications").Active = False
    App.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll
    App.Test.Settings.Launchers("Windows Applications").RecordOnQTDescendants = True
    App.Test.Settings.Launchers("Windows Applications").RecordOnExplorerDescendants = False
    App.Test.Settings.Launchers("Windows Applications").RecordOnSpecifiedApplications = True
    App.Test.Settings.Run.IterationMode = "rngIterations"
    App.Test.Settings.Run.StartIteration = 6
    App.Test.Settings.Run.EndIteration = 6
    App.Test.Settings.Run.ObjectSyncTimeOut = 20000
    App.Test.Settings.Run.DisableSmartIdentification = True
    App.Test.Settings.Run.OnError = "Dialog"
    App.Test.Settings.Resources.DataTablePath = "<Default>"
    App.Test.Settings.Resources.Libraries.RemoveAll
    App.Test.Settings.Resources.Libraries.Add("FPS_Functions.vbs")
    App.Test.Settings.Resources.Libraries.Add("General_Functions.vbs")
    App.Test.Settings.Resources.Libraries.Add("Global_Varaibles.vbs")
    App.Test.Settings.Resources.Libraries.Add("Reporting_Functions.vbs")
    App.Test.Settings.Resources.Libraries.Add("Document_Functions.vbs")
    App.Test.Settings.Web.BrowserNavigationTimeout = 60000
    App.Test.Settings.Web.ActiveScreenAccess.UserName = ""
    App.Test.Settings.Web.ActiveScreenAccess.Password = ""
    App.Test.Settings.Recovery.Enabled = True
    App.Test.Settings.Recovery.SetActivationMode "OnError"
    App.Test.Settings.Recovery.Add "FPS_Recover_Scenarios.qrs", "ADOBE-Doc_May_Be_Open", 1
    App.Test.Settings.Recovery.Item(1).Enabled = True 
  • Thanks for your return.
    But I found out that I need to change the TC_EXEC_EVENT_HANDLE field. This field stores the "Run Events" of each test case (step). I changed the same in ALM and captured the value with the OTA and it returned the following:
    "{
    THISDATA: \ 00000022 \ {
    EVENT_1: "{
    ACTION: 2
    }
    "
    }

    } "

    ----
    This is a field of type Clob to the oracle database.
    Now I will try to manipulate as a script and update the field by OTA.

  • I got it.
    In the code below I assemble the string and update the field in ALM.
    This set my step to exit the test run successfully.

    DiretorioExecucao = Plan8.Cells(LinDir, "H")
    Set tSetFolder = tsTreeMgr.NodeByPath(DiretorioExecucao)
    Set TestSetsList = tSetFolder.FindTestSets("")

    'Set TestSetsList = tSetFolder.NewList("")
    Contador = 0
    CenAtual = ""
    NomeCenPlan = ""
    Do While Contador < TestSetsList.Count

    Set theTestSet = TestSetsList.Item(Contador 1)
    Set TSTestFact = theTestSet.TSTestFactory
    Set TestSetTestsList = TSTestFact.NewList("")

    For Each theTSTest In TestSetTestsList

    Dim txtRunEvent As String
    txtRunEvent = ""
    txtRunEvent = txtRunEvent & "{" & vbCrLf
    txtRunEvent = txtRunEvent & "THISDATA:\00000022\{" & vbCrLf
    txtRunEvent = txtRunEvent & "EVENT_1:""{" & vbCrLf
    txtRunEvent = txtRunEvent & "ACTION:2" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf
    txtRunEvent = txtRunEvent & """" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf & vbCrLf
    txtRunEvent = txtRunEvent & "}"

    theTSTest.Field("TC_EXEC_EVENT_HANDLE") = txtRunEvent
    theTSTest.Post

  • I got it.
    In the code below I assemble the string and update the field in ALM.
    This set my step to exit the test run successfully.

    DiretorioExecucao = Plan8.Cells(LinDir, "H")
    Set tSetFolder = tsTreeMgr.NodeByPath(DiretorioExecucao)
    Set TestSetsList = tSetFolder.FindTestSets("")

    'Set TestSetsList = tSetFolder.NewList("")
    Contador = 0
    CenAtual = ""
    NomeCenPlan = ""
    Do While Contador < TestSetsList.Count

    Set theTestSet = TestSetsList.Item(Contador 1)
    Set TSTestFact = theTestSet.TSTestFactory
    Set TestSetTestsList = TSTestFact.NewList("")

    For Each theTSTest In TestSetTestsList

    Dim txtRunEvent As String
    txtRunEvent = ""
    txtRunEvent = txtRunEvent & "{" & vbCrLf
    txtRunEvent = txtRunEvent & "THISDATA:\00000022\{" & vbCrLf
    txtRunEvent = txtRunEvent & "EVENT_1:""{" & vbCrLf
    txtRunEvent = txtRunEvent & "ACTION:2" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf
    txtRunEvent = txtRunEvent & """" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf & vbCrLf
    txtRunEvent = txtRunEvent & "}"

    theTSTest.Field("TC_EXEC_EVENT_HANDLE") = txtRunEvent
    theTSTest.Post

  • I got it.
    In the code below I assemble the string and update the field in ALM.
    This set my step to exit the test run successfully.

    DiretorioExecucao = Plan8.Cells(LinDir, "H")
    Set tSetFolder = tsTreeMgr.NodeByPath(DiretorioExecucao)
    Set TestSetsList = tSetFolder.FindTestSets("")

    'Set TestSetsList = tSetFolder.NewList("")
    Contador = 0
    CenAtual = ""
    NomeCenPlan = ""
    Do While Contador < TestSetsList.Count

    Set theTestSet = TestSetsList.Item(Contador 1)
    Set TSTestFact = theTestSet.TSTestFactory
    Set TestSetTestsList = TSTestFact.NewList("")

    For Each theTSTest In TestSetTestsList

    Dim txtRunEvent As String
    txtRunEvent = ""
    txtRunEvent = txtRunEvent & "{" & vbCrLf
    txtRunEvent = txtRunEvent & "THISDATA:\00000022\{" & vbCrLf
    txtRunEvent = txtRunEvent & "EVENT_1:""{" & vbCrLf
    txtRunEvent = txtRunEvent & "ACTION:2" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf
    txtRunEvent = txtRunEvent & """" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf & vbCrLf
    txtRunEvent = txtRunEvent & "}"

    theTSTest.Field("TC_EXEC_EVENT_HANDLE") = txtRunEvent
    theTSTest.Post

Reply
  • I got it.
    In the code below I assemble the string and update the field in ALM.
    This set my step to exit the test run successfully.

    DiretorioExecucao = Plan8.Cells(LinDir, "H")
    Set tSetFolder = tsTreeMgr.NodeByPath(DiretorioExecucao)
    Set TestSetsList = tSetFolder.FindTestSets("")

    'Set TestSetsList = tSetFolder.NewList("")
    Contador = 0
    CenAtual = ""
    NomeCenPlan = ""
    Do While Contador < TestSetsList.Count

    Set theTestSet = TestSetsList.Item(Contador 1)
    Set TSTestFact = theTestSet.TSTestFactory
    Set TestSetTestsList = TSTestFact.NewList("")

    For Each theTSTest In TestSetTestsList

    Dim txtRunEvent As String
    txtRunEvent = ""
    txtRunEvent = txtRunEvent & "{" & vbCrLf
    txtRunEvent = txtRunEvent & "THISDATA:\00000022\{" & vbCrLf
    txtRunEvent = txtRunEvent & "EVENT_1:""{" & vbCrLf
    txtRunEvent = txtRunEvent & "ACTION:2" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf
    txtRunEvent = txtRunEvent & """" & vbCrLf
    txtRunEvent = txtRunEvent & "}" & vbCrLf & vbCrLf
    txtRunEvent = txtRunEvent & "}"

    theTSTest.Field("TC_EXEC_EVENT_HANDLE") = txtRunEvent
    theTSTest.Post

Children
No Data