Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction To ‘Parameterization’

Similar presentations


Presentation on theme: "Introduction To ‘Parameterization’"— Presentation transcript:

1 Introduction To ‘Parameterization’

2 Parameterization Parameterization is used to change the value of any variable at run time.

3 Following can be parameterized in a script file:-
URL portion Header portion BODY portion

4 How is parameterization done?
Parameterization is done through NetStorm variables (NS Variables).  There are different kinds of NetStorm variables. Different variables are initialized in different way. Declaration of different variables is also different and they are used for different work. NS Variable value is accessed by putting it’s name within curly braces ({}).

5 Steps to be followed through GUI
1.Go to Login page of NetStorm machine

6 Login using your credentials. NetStorm dashborad will open.

7 Go to Test Scripts tab and click on Launch Script Manager
Go to Test Scripts tab and click on Launch Script Manager. This will launch Script Manager.

8 Open the script

9 If script is recorded in Legacy Mode, then parameterization will be done in script.capture file.
If script is recorded in C Mode then parameterization will be done in registration.spec. file

10 After selecting the appropriate file ,go through the following procedure.
Click on File > Parameters. (Various parameters will be available here, choose the one as per your requirement.)

11 Also you do the same work in the following manner
Right-click anywhere in the right-pane. You will get menu as shown below:-

12 NetStorm will now automatically place parameter APIs at appropriate place in the file.

13 To Parameterize URL? Format of url is as follows::
scheme://domain:port/path?query_string#fragment_id You can parameterize any part of query_string or path of resource.

14 url can be parameterized in the following manner::
Parameterize query_string used in a web_url () function may be parameterized using NS variable username as Here the URL shall be modified each time using the current value of NS variable username. Parameterize path of resource robert Here the URL shall be modified each time using the current value of NS variable address.

15 To Parameterize Header
Any part of HEADER can be parameterized Example:- HEADER=Accept-Language: en-in used in a web_url () function may be parameterized using NS variable language as HEADER=Accept-Language: en-in{language} Here HEADER will be modified each time using the current value of NS variable language.

16 To Parameterize BODY Any part of BODY can be parameterized Example:-
BODY=Current Date is used in a web_url () function may be parameterized using NS variable cur_date as  BODY=Current Date is {cur_date} Here BODY will be modified each time using the current value of NS variable cur_date.

17 Types of Parameters There are 9 types of parameter. They are:- File Parameter Search Parameter Declare Parameter XML Parameter Index File Parameter Date Time Parameter Random String Parameter Random Number Parameter Unique Number Parameter These parameters are explained in detail in subsequent slides.


Download ppt "Introduction To ‘Parameterization’"

Similar presentations


Ads by Google