Search code examples
qtphp-ufthp-alm

How to call a Reusable Action that is stored in HP ALM-QC at run time


I want to call a reusable action in my script at run time. This reusable action is stored from HP ALM-QC, not in my local machine.

See below for the current set-up of my test script:

The reusable action was called using the Solution Explorer:

How reusable action was called in the script.

Location of the Reusable Action:

Reusable Action Properties.

How it looks like in the test script:

enter image description here

Now, what I am trying to do is to call the reusable action directly in the test script. Not by adding it in the Solution Explorer.

Could it be done by using something like:

ExecuteFile "[ALM] ..."?

Thanks,


Solution

  • I made it worked by using LoadAndRunAction

    Command Structure:

    If Reusable Action Stored in the HP ALM:

    LoadAndRunAction "[ALM] Subject\FolderPath\TestScriptName", "ActionName", oneIteration
    

    If Reusable Action Stored in the Local Machine:

     LoadAndRunAction "C:\FolderPath\TestScriptName", "ActionName", oneIteration