Parameters

Parameter are used in most modern applications to communicate
data between the user and the application. AppPerfect offers extensive parameter-management.
Parameter selection and hence testing with various parameter values is completely automated.
Parameter values are passed either via the URL itself or via the event arguments and attributes. In the
AppPerfect application, parameters are stored as name-value pairs, making it
intuitive for application developers and testers. Then, depending on the
number of iterations for your project, multiple parameter values can be
tested, with options to select parameters sequentially or randomly. The following types of
parameters are supported in AppPerfect Web Test:

Runtime parameters

Runtime parameters are those parameters whose value can be picked either
from a DB or from a CSV file just before the replaying of test or task starts. This way
AppPerfect Web Test ensures that it is running the test with most recent
values present in either DB or CSV file. You can change the values in DB and
CSV file just before running the test in order to test this application with
different parameter values.

Fixed parameters

Fixed parameters are those parameters whose values can be entered manually
or picked from DB or picked from CSV file while defining the test. AppPerfect
Web Test will maintain this hard-coded list of values and will use these
values during replaying. In this case each time test is run same set of
values will be used.

Parameterization

Consider a Web application with a login page which takes a
user name and a password. You need to test this page to ensure valid users
(of various categories) are accepted and invalid users (incorrect user
name/password) are rejected. To test this page, what you essentially want to
do is connect a series of user names and passwords to the login page. This process
of defining multiple values for elements is called Parameterization.

While it is possible to manually go to the login page and
enter each of the user name/password values and then have the test repeated,
often, the number of combinations of input values is too large to perform
manually. Consider a case of an e-commerce Web site with thousands of items
in the database. In such cases, parameterization plays a vital role in making
your tests flexible and powerful.

Element/Event Parameterization

AppPerfect Web Test records attributes for the HTML/Window element on which event was recorded. It also records the event arguments which should be used to replay events, like "text" argument containing the value with which set/type events should be executed. You can parameterise Atributes as well as event arguments. Multiple parameter values can be defined for a recorded element. If
the test is run for multiple iterations you will also need to specify the
mechanism that the AppPerfect Web Test must use to pick from the
list of possible values. Random and Sequential are two
supported ordering in which values can be selected.

URL Parameterization

In most real world Web applications, URLs are not simple
static links. Most are dynamic URLs designed to handle a variety of tasks. A
simple example would be a login page. In a real world scenario, you might
have dozens if not more registered users, each with their own password and
other information such as locale, timezone. For such a scenario, the URL
could be:

In the URL above, "user" and "password" are parameters
that are accepted by the "login.jsp" URL. The "username" and "userpwd" are
parameter values that the user may have entered in the login.jsp form
page and clicked on the Submit button. Most modern Web sites use this kind of
mechanism of passing parameters and values through the URL. One of the most
common objects passed as a URL parameter is a "session id".

AppPerfect Web Test recognizes the wide spread use
of parameters and provides extensive support for it. Parameters can be
created and then applied to individual URLs that have been recorded. You can also define whether the applied parameters must
be applied sequentially or randomly on subsequent invocation of URL.

Parameter Setting Wizard

These are the following ways in which you can access the Parameter Setting
Wizard.

Select the URL node in the Editor tree and on right hand side Click the 'Parameters' tab. Here you can see the list of
parameters that have been encountered while recording the task. Click a
parameter name and then the button 'Parameterize'.

You can also parameterize recorded attributes of element. Just select any element/event in the Editor tree and
select Attributes tab on right hand side window and parameterize the Attribute using the "Parameterize"
button provided.

You can also parameterize arguments in event apis. Just select concerned event in the Editor tree and on right hand side Details tab look for Event arguments if any and parameterize the same using the "Parameterize"
button provided. Say for example in case you need to run test with differnt input values for set/type events, then you can parameterize the "text" argument in this case.

On clicking 'Parameterize' button a parameter settings dialog will be shown,
which will allow you to configure parameter value as constant or configurable test parameter. You can create new test parameter and associate it with URL Parameter/ Event argument/Attribute here.

Test Parameters View

You can see a list of configured test parameters using "Parameters" Node in the
Editor tree. Select any test parameter to see its details at the bottom. You can edit the test parameter using
the UI provided at the bottom. The test parameter configuration has following fields:

Data Source: You can choose the data source from one of the following :

Parameter Selection: You can choose parameters Sequentially or Randomly. The
Random selection option is very useful when you want to test a large number
of values in limited time. Every replay of the test will pick random values,
thereby giving you a good picture of the application's stability and
performance.

Add Value: If you want to add parameters manually (Fixed Values), then enter the values in this field and click the
Add button. The values added will appear in the non-editable text area Parameter Values.

Fixed Values

Use Fixed Values when there are only a few values you want to test the parameter with. You can configure parameter to have fixed pool of values from where the value should be picked during execution.
But in most cases, you will find that Importing the values from a Database or
a CSV file will make your web application's testing for parameters very
efficient.

Import From Database

Database ID: Select the database id from the dropdown provided. It will have ids of all the Database connections configured with AppPerfect Web Test. In case this dropdown is empty, you need to configure a Database with AppPerfect Web Test. Click on configure button and it will take you to Tools -> Options -> Browsers, JDKs & DBs. You can configure Database connection settings there. Once you configure the database you will find the database id for same in this dropdown which you can select,

Query: Enter the query that will be used to
fetch the rows. It is recommened that you Validate this query before
replaying the test, as it will eliminate the possibility of failure due to
non-connectivity with the database.

Fetch Values: Select from - Now or Runtime. If
you select 'Now' the connection will be established right away with your
database and values will be fetched.

If you select 'Runtime' the connection with your database will be
established while the test is being replayed when you reach the point where
values have to be provided. This will be slower than the earlier option, but
more realistic for testing.

Fetch All Rows: Select this checkbox if you want
to fetch all rows from your database. Please ensure that you are aware of how
many rows are contained in the database so that the time it will take to
fetch the values can be built into replaying the test.

Number of rows to fetch: Enter the number of
rows to fetch if you have not selected the previous checkbox.

Validate Query: Click this button to validate
the SQL query.

Import from CSV File

Please note for CSV
files: The values in your CSV files can be separated with a comma(,),
semicolon(;), colon(:) or tab, but each value must appear on a new
line.

CSV File: Browse to the location of the CSV
file.

First row contains column header: Select this checkbox if the first row in
your CSV file contains column header, i.e. the actual values start from
second row.

Column Index: If your CSV file has multiple
columns, you need to specify the column index from which to fetch the values.
By default the column index value is 0.

Value Delimiter: Select the character which is
used in your CSV file to separate values.

String Delimiter: If your file contains strings
as values for parameters, specify the character that separates the strings.
For instance, the strings in your file may appear with double quotes. If you
don't want to use the double quotes in the values taken from the file, then
specify double quotes here (").

e.g.: "Java", "J2ee", "JMX", "XML"

In the above, the value delimiter is comma (,) and the string delimiter is
double quotes (").

Fetch Values: Select from - Now or Runtime. If
you select 'Now' the connection will be established right away with the CSV
file and values will be fetched.

If you select 'Runtime' the connection with your CSV file will be
established while the test is being replayed when you reach the point where
values have to be provided. This will be slower than the earlier option, but
more realistic for testing.

Fetch All Rows: Select this checkbox if you want
to fetch all rows from the CSV file. Please ensure that you are aware of how
many rows are contained in the CSV file so that the time it will take to
fetch the values can be built into replaying the test.

Number of rows to fetch: Enter the number of
rows to fetch if you have not selected the previous checkbox.

Calculated Values

In case you need to generate unique parameter values automatically with fixed prefix/suffix or if you need to generate date from Today's date or random date in various format then you can select Calculated values as datasource. For example in case you calculate as "number" with fixed prefix say "example" and increment by 1, then values generated would be example1, example2, example3 etc. If you select Calculate as "Date", you will be able to configure the date format (either select from pre-defined date formats or provide your custom date format as it is an editable combo box). You can choose between Today's date or Random Date. In this case application will generate the value as date string in specified format.

Pass-Through Values

Pass-Through parameters are those whose value will be picked from the response of previous URL while replaying the test. You can set pass-through parameters in the Parameters view by selecting the "Pass-Through Values" from the data source combo box. An example of Pass-through parameter is a session ID. This variable will have a value assigned it to based on some algorithm only at run-time. If you run a test using the stored value of a session ID, your test may not go further than login as that session might have expired. For a situation like this, you need to set the 'Pass-through Values' option for the parameter.