Unique Number Parameter is used to generate unique
number across all of the users.
Unique number generated is 16121217
And if value is updated then only increment of 1
(sequentially) takes place.
Unique No. window looks like as follows::
Description of all the fields::
1.Parameter Name
‘Parameter name’ is a ‘Unique no. parameter Variable
Name’ which is used to access this parameter in the
entire script.
Variable name consists of only English alphabet and _
(it also accepts alpha-numeric name).
2.Format
Length of the no. generated can be specified here.
It can have following values:%01lu
%02lu
%03lu
%04lu
%05lu
%06lu
%07lu
%08lu
%09lu
If the length of the number generated is less than the specified
length, then it is left padded with zeros.
5.Update Value On
This field is used to tell Netstorm when to generate
new string:
It has two options:1. Session
2. use
Session::
Means generate unique once and use this value for the entire
session.
i.e. If ‘session’ is chosen, unique no. is generated only for first use
of unique no. Parameter. Then for the entire script, same value is
used.
Use::
Means generate unique no. every time Random String Parameter
is used.
i.e. If ‘Use’ is chosen, unique no. is generated for each use of
unique no. Parameter. For example::If unique no. Parameter is
used 50 times in script, then in case of ‘use’, for every reference,
new no. is generated.
Next generated no. is incremented by 1 for its each use.
Example: In this example, we will generate a Random Number
for Credit Card number and parameterize it on
Confirmation Page.
In registration.spec file, right-click in right pane and
choose Parameters > Unique Number Parameter
Click on ADD button
Set following values:-
Click on OK > Close. Following API will be inserted in
registration.spec file:nsl_unique_number_var(CreditCard,
Format=%08lu, Refresh=SESSION);
Click on SAVE button.
Double click on flow file and parameterize Credit Card
number available on Confirmation Page.
After parameterization, it will look like as shown below:ns_web_url ("Confirmation",
"URL=http://192.168.1.39:83/cgibin/findflight?firstName=Tiger&lastName=Scott
address1=4261+Stevenson+Blvd.&address2=Fremont%2C+
CA+94538&pass1=Scott+Tiger&creditCard={CreditCard}&
expDate=12%2F2%2F&oldCCOption=&numPassengers=1&s
eatType=Coach&seatPref=None&outboundFlight=000%7C
0%7C09-172011&advanceDiscount=&.cgifields=saveCC&buyFlights.x=7
6&buyFlights.y=13",
"HEADER=Accept-Language: Z",
INLINE_URLS,
"URL=http://192.168.1.39:83/tours/Merc10dev/images/banner_animated.gif", "HEADER=Accept-Language: Z",
END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/sun_swede.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/images/splash_flightconfirm.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/images/bookanother.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif",
"HEADER=Accept-Language: Z", END_INLINE
);
Click on Save button and execute scenario.
Now look at request with number 5. It will look as follows:GET /cgibin/findflight?firstName=Tiger&lastName=Scott&address1=4261+Stevenson+Blvd..
&address2=Fremont%2C+CA+94538&pass1=Scott+Tiger&creditCard=
16777217&expDate=12%2F2%2F&oldCCOption=&numPassengers=1&seatType=Coa
ch&seatPref=None&outboundFlight=000%7C0%7C09-172011&advanceDiscount=&.cgifields=saveCC&buyFlights.x=76&buyFlights.y=13
HTTP/1.1
Host: 192.168.1.39:83
User-Agent: Mozilla_CA/4.79 [en] (X11; U; Linux 2.4.18-3d_epoll i686)
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,
video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.
Accept-Encoding: gzip, deflate, compress;q=0.9^M
Keep-Alive: 300
Connection: keep-alive
Accept-Language: Z
VALUE SUBSTITUTED BY NETSTORM IS SHOWN IN BOLDS.
Ex: Parameter Name
No special symbols are allowed
Space is not allowed
Numeric value is not allowed
Alpha-numeric value is acceptable
Ex : Update Value On ‘Session’
cavisson systems
19
Parameterizing Login Page in hpd.c file
ns_web_url ("Login",
"URL=http://192.168.1.39:83/cgibin/login?userSession=75893.0884568651DQADHfAp
HDHfcDtccpfAttcf&username={username}password={
password}JSFormSubmit=off&login.x=0&login.y=0?
{session_demo}",
"HEADER=Content-Type: application/x-www-formurlencoded{session_demo}",
"HEADER=Accept-Language: Z{session_demo}",
contt..
cavisson systems
20
INLINE_URLS,
"URL=http://192.168.1.39:83/tours/Merc10dev/images/banner_animated.gif", "HEADER=Accept-Language: Z",
END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10dev/images/sun_swede.gif", "HEADER=Accept-Language: Z",
END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif",
"HEADER=Accept-Language: Z", END_INLINE
);
cavisson systems
21
Now look at request . It will look something like follows:( VALUE
SUBSTITUTED BY NETSTORM IS SHOWN IN BOLDS)
GET /cgibin/login?userSession=75893.0884568651DQADHfApHDHfcDtc
cpfAttcf&username=password=JSFormSubmit=off&login.x=0&lo
gin.y=0? 16777217%22Uxf0w HTTP/1.1^M
Host: 192.168.1.39:83^M User-Agent: Mozilla/4.0 (compatible;
MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC2; .NET
CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media
Center PC 6.0; InfoPath.2; .NET4.0C)^MAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.
9,text/plain;q=0.8,video/xmng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M
Accept-Encoding: gzip, deflate, compress;q=0.9^M
Keep-Alive: 300^M
Connection: keep-alive^M
Content-Type: application/x-www-formurlencoded16777217"Uxf0w^M
Accept-Language: ^RZ16777217"Uxf0w^M
^M
cavisson systems
22
Unique No. generated is the same at all the places as
we have used “session”
cavisson systems
23
Ex:Update Values On ‘Use’
cavisson systems
24
Parameterizing Login Page in hpd.c file
ns_web_url ("Login",
"URL=http://192.168.1.39:83/cgibin/login?userSession=75893.0884568651DQADHfAp
HDHfcDtccpfAttcf&username={username}password={
password}JSFormSubmit=off&login.x=0&login.y=0?
{use_demo}",
"HEADER=Content-Type: application/x-www-formurlencoded{use_demo}",
"HEADER=Accept-Language: Z{use_demo}",
contt..
cavisson systems
25
INLINE_URLS,
"URL=http://192.168.1.39:83/tours/Merc10dev/images/banner_animated.gif", "HEADER=Accept-Language: Z",
END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10dev/images/sun_swede.gif", "HEADER=Accept-Language: Z",
END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/flights.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/home.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/Merc10-dev/images/signoff.gif",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/images/banner_merctur.jpg",
"HEADER=Accept-Language: Z", END_INLINE,
"URL=http://192.168.1.39:83/tours/vep/images/velocigen.gif",
"HEADER=Accept-Language: Z", END_INLINE
);
cavisson systems
26
Now look at request . It will look something like follows:( VALUE
SUBSTITUTED BY NETSTORM IS SHOWN IN BOLDS)
GET /cgibin/login?userSession=75893.0884568651DQADHfApHDHfcDtccpfAtt
cf&username={username}password={password}JSFormSubmit=off&log
in.x=0&login.y=0? 16777217Uxy HTTP/1.1^M
Host: 192.168.1.39:83^M
User-Agent: Mozilla_CA/4.79 [en] (X11; U; Linux 2.4.18-3d_epoll
i686)^MAccept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,video/xmng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.^M
Accept-Encoding: gzip, deflate, compress;q=0.9^M
Keep-Alive: 300^M
Connection: keep-alive^M
Content-Type: application/x-www-form-urlencoded16777218^M
Accept-Language: ^RZ16777219^M
^M
cavisson systems
27
Unique no. generated is different at all places as we
have used ‘use’.
Also we can see here that each time new no. is
incremented by 1
cavisson systems
28
© Copyright 2026 Paperzz