What is paramerization in qtp and tell me how to parameterize the tests.could u please explain with an example.

Showing Answers 1 - 4 of 4 Answers

When you test your applications, you may want to check how theapplication performs the same operations with multiple sets of data.Eg: 1) Confirm that the Active Screen and Data Table option is enabled.2) Select the text you want to parametrize.eg any drop down list select any name eg; newyork3) A value Config. option window open select parameter and confirm DATA table is selected.4) and in the same window give some name eg: Departure5) 6) select ok and the main window of qtp open. In the ITem column u will see a icon <*> some thing like this click on it and check that a value new york is inserted in datatable below.7) add two more city name eg: if we are taking from drop down list add only those names or else any name8) after adding run the test. The test will run for 3 times taking each time each value from the datatable.9) Modify the steps affected by para. and run the test that all...In short if u have QTP installed go the the documentation of tutorial u will get quick view of the example. ok.

  Was this answer useful?  Yes

smartmanoj

  • Nov 13th, 2006
 

hi brahma,

u can use parameter utility object in the following way. 

Consider two actions Action1, Action2.  Define the input parameters say String1, and output parameters say String2 in the Action Properties (right click an action in keyword view and choose Action Properties>Parameters) for Action2

Now i want to pass the string value "Manoj" to Action2 from Action1 and get the string value "Cute manoj" from Action2.  Find the following code snippet in Action1 and Action2

Action1 :

RunAction "Action2", oneIteration, "Manoj", String2

msgbox String2

Action2 :

msgbox Parameter.Item("String1")

Parameter.Item("String2") = "Cute Manoj"

To retrieve the value of the input parameter : Parameter.Item("String1")

To assign the value to the output parameter : Parameter.Item("String2") = "Cute Manoj"

P.S.:  I run the code snippets in QTP. It is working fine.  No negative comments on this explanation will be accepted.

  Was this answer useful?  Yes

suresh babu muppasani

  • Dec 24th, 2006
 

Parametarization : passing the run time input values with the help of datatable or datesource is called parametarization.

Note : parametarization is possible  in keyword view only. or by writing the script.

Ex : Dialog("Login").winEdit("AgentName:").Set "suresh" 

 ---> goto key word  view -->value column --> click onagentname row (u can get configure button <#> ) -->it displayes the parametarization window --> enter the name  ( name is rajesh ) -->ok

the above statemenbt is modified as

Dialog("Login").winEdit("AgentName:").Set Datatable ("rajesh",dtglobalsheet)

Note : without goiong to keyword view u can write the script for parametarization in export view also.

Further Queries : sureshmuppasani@gmail.com

  Was this answer useful?  Yes

anjalireddy

  • Dec 29th, 2006
 

 When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.

 

OR

 

     we can parameterize data in QTP:

There are four types of parameters: Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, Quick Test uses a different value from the Data Table. Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that Quick Test generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have Quick Test generate a random number and insert it in a number of tickets edit field.

 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions