Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test Output Parameter
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi,
Ankur Could you please give a reply for my query below.

My test has one Input and one Output Parameter.
Test has one action and action has one Input and One Output parameter.

I set the following values for parameters

Code:
action1_InputParameter=Test1_Input Paramter.

Do some calculations. Then store the results in action1_OutPutParameter.

Then I stored the action1_OutPutParameter into Test1_OutPutParameter.

Code:
Test1_OutPutParameter=action1_OutPutParameter .

I called the test from an .vbs file by invoking QTP.
I tried to access the Test OutPut Parameter and I received only Blank Values.

Could you please let me know how to set & get value for a Test Output parameter.

thanks,
Raja
Reply
#2
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi Raja,

How are you retrieving the output paramater in the vbs?
It will help if you can paste a piece of statements here.

generally we need to create the parameter collection using Test.ParameterDefinitions
then get all the parameters
set a variable for your output parameter and you can get the output at the Run statement in vbs

let me know if you need more help on this.
here is a sample vbs in case you need
Code:
Set qtApp = CreateObject("QuickTest.Application")
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions")
qtApp.Launch
qtApp.Visible = True

qtResultsOpt.ResultsLocation = "D:\results"

qtApp.Open "C:\QTP\Script\Script1"

' parameters collection defined
Set pDefColl = qtApp.Test.ParameterDefinitions

Set rtParams = pDefColl.GetParameters()

'added parameters Run the script
qtApp.Test.Run qtResultsOpt, True, rtParams

'Extract the output Parameter
Set rtParam = rtParams.Item("OutputVal")

msgbox "OutputParam : " & rtParam.Value
hope this helps

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [ QC& QTP] issue with Qc design step parameter seritalien 0 1,919 05-29-2013, 06:56 PM
Last Post: seritalien
  Running Quick Test With QC with a Parameter bolls 0 2,691 12-13-2011, 11:24 PM
Last Post: bolls
  Get the Parent Folder name in Test Plan for a Test from Test Lab using QTP godsown 0 6,107 09-29-2011, 04:55 PM
Last Post: godsown
  SAP eCATT <-> QTP Parameter exchange mti 2 4,048 05-23-2011, 04:50 PM
Last Post: mti
  how to pass parameter from one action to another kamalteja 0 5,003 03-26-2008, 03:47 PM
Last Post: kamalteja

Forum Jump:


Users browsing this thread: 1 Guest(s)