automationvbscripthp-uft

How to set qtRunResultsOptions.ResultsLocation to an ALM test set path


I'm working on an AOM to run my UFT scripts via .vbs files I've seen some samples on how to set the Results location via local and temp path but for my goal, I want to set the Results Location on a specific Test Set inside alm.

I have already established ALM connection and manage to open a script that is inside ALM

Here's the portion of the code I am currently using and I want to modify:

' Prepare the RunResultsOptions object
    Set qtRunResultsOptions = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
    qtRunResultsOptions.ResultsLocation = "<TempLocation>" ' Set a temporary results location

I want to change the "TempLocation" into a specific Test Set path inside ALM. I'm wondering what would be the syntax and parameters needed.


Solution

  • As stated in the documentation you need to use <NewLocation> and set the three values TDRunName, TDTestInstance, and TDTestSet.

    ' Prepare the RunResultsOptions object
    Set qtRunResultsOptions = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
    qtRunResultsOptions.TDRunName = "..."
    qtRunResultsOptions.TDTestInstance = "..."
    qtRunResultsOptions.TDTestSet = "..."
    'The above values must be set to generate a test path.
    qtRunResultsOptions.ResultsLocation = "<NewLocation>"
    

    Code is provided untested
    ... Denotes required information