Forum Discussion

Nayak_Ragh's avatar
Nayak_Ragh
Occasional Contributor
4 years ago
Solved

How to use 'Set Variable value' at project suite, in another test

I am trying to use a Vendor ID captured from Test-1 using 'Set variable value', in Test-2.

Variable is declared at Project Suite level and The value is successfully captured in Test-1. I have used the same variable at another step in Test-1 and it is working fine.

This is how the data was captured at Test-1:

Operation : VendorID [ProjectSuite]

Value :

Aliases.Ax32.Vendors.TaskPageLayout.PartHostSplitContainer.SplitterPanel.NativeWindowControl.NativeWindowWithEvents.VendTable.AxTabCtrl.AxPaneWnd.AxPaneWnd.General.AxPaneWnd.Identification.Vendor_account.Value

 

This is how I am trying to display the data at Test-2:

Operation : Keys

Value : ProjectSuite.Variables.VendorID

 

But the operation is failing but the value is not getting passed. Kindly advise if I am missing something.

  • I just tested this out. You need to run both tests in the same execution plan, with Test1 first followed by Test2.

     

    If you run the first test by itself, followed by the second test by itself, the variable value is not persistent. It will only be set for the duration of the execution.

1 Reply

  • tphillips's avatar
    tphillips
    Frequent Contributor

    I just tested this out. You need to run both tests in the same execution plan, with Test1 first followed by Test2.

     

    If you run the first test by itself, followed by the second test by itself, the variable value is not persistent. It will only be set for the duration of the execution.