Subscribe to SoftLogica
Newsletter to get 10% discount on newly
released products!
Editing Page Requests
Editing Page Requests
Requests inherit the properties of user profile which they belong to.
However, you can change some properties of individual
requests.
Click on any request in the Navigation Pane and you will see its properties in the right pane.
Information is divided into 2 parts and displayed correspondingly on the
Properties and Response processing tabs.
Properties
On this tab you can edit the properties that form
the request. Use this tab before sending the request.
Response processing
On this tab you can analyze
server response. Use this tab after sending the request and receiving a response from the server.
Properties
Name
Here you can change the name of the current page. For example, instead of default names page_1, page_2,
you can type names with the certain meaning (for example, "Login", "Catalog",
"Forum" etc).
Server
Here you can modify server name and port number.
HTTPS
Mark this checkbox if you wish to test pages that require SSL connection.
URL address of such pages will start with https://.
During test run, all the necessary settings for secure connection will be taken from
the HTTPS tab of "Settings" dialog, namely, the version of SSL and
SSL client-side certificate (in case the server requests such certificate).
URL Path
You can use either recorded URL, or get it dynamically at run-time. To get URL dynamically, you
should use variables. Click the Use Variable... button and select a desired variable
in the displayed dialog:
Selected variable will be incorporated into URL. You can add as many variables to URL path as you need.
Method
Here you can choose a method of sending parameters to the server.
You can select either GET, or POST request method.
Suppose, you recorded a request http://host/path which has
several parameters: param1=value1
param2=value2
param3=value3
When you use GET request method, parameters are transmitted in page request string. They are
attached to the end of URL path after a question mark. In our example, the following URL will be sent
to the server: http://host/path?param1=value1¶m2=value2¶m3=value3
When you use POST method, parameters are transmitted implicitly (in the body of HTTP request).
GET method
You can define the list of parameters (on the URL Parameters tab of this view)
and they will be attached to the end of URL path after a question mark.
WAPT Pro provides you with a number of functions for
dynamic calculation of request parameter values
at run-time. The resulted value can be also calculated as the concatenation of results of some functions.
See the topic Parameter Value Dynamic Calculation
for detailed description of
functions and function editor.
Add..: Opens the Edit Parameter dialog where you can
define a new parameter and a function for its calculation. Remove: Removes selected parameter from the list. Edit..: Opens the Edit Parameter dialog
where you can modify the properties of selected parameter: name and function for its calculation.
Encode parameters:
This option is inherited from profile properties, but you can change it for individual requests.
It defines whether to encode request parameters, or not when they are transferred to the server.
If this option is checked, WAPT Pro encodes all values of parameters in queries.
However, some sites may require parameters in raw format. For such sites you can disable parameters encoding - just
uncheck this option.
Besides, you can enable/disable the encoding for any particular parameter in the list - check/uncheck the box in the
Encode column next to the necessary parameter.
POST method
If you select the Post method, you will see a new tab POST Parameters. There you can
define the list of parameters which will be transmitted in the body of HTTP request.
POST parameters type:
There are 3 available types of POST requests in WAPT Pro:
Form-Data, Multipart/Form-Data and Text.
Form-Data
If you select Form-Data, then parameters will be transmitted in the body of HTTP request
as the following string:
param1=value1¶m2=value2¶m3=value3.
You can define the list of parameters using Add, Remove and
Edit buttons. You can also check/uncheck the option to encode parameters.
Multipart/Form-Data
If you select Multipart/Form-Data content type, parameters will be also transmitted in the body of HTTP request,
but in the different way:
Here
you can read more about the Multipart content type.
Note that if you transfer a file, the program will use Multipart/Form-Data content type by default.
Text
If you select this option, you will be able to enter any text string in the box
below. The specified text string will be sent as the body of HTTP request.
You can use variables as well.
Type $Var(variable_name) where variable_name
is the name of some variable.
Content type: Here you should specify request content type
(for example: text/html, text/xml etc).
Code page
Here you can select encoding that will be used during test runs
for request parameters containing text strings.
You will need this option for testing multilingual web sites.
When WAPT Pro records a page, it uses the
encoding specified in Internet Explorer options.
During test runs, WAPT Pro uses the encoding selected in the
Code page combo-box.
Default encoding here corresponds to the default locale in your
Regional Options (Start -> Settings -> Control Panel -> Regional Options).
However, you can select any other encoding for your requests, and
it will be used during test runs.
HTTP Headers
On the HTTP Headers tab of request properties
you can edit custom strings in the HTTP header of current page request.
By default, HTTP header specified for the whole user profile is used
for all its requests. However, you can change the HTTP header for individual requests.
Add: Adds a new custom string to the list. Specify string name and value. Remove: Removes selected custom string from the list.
Page Elements
Switch to the Page Elements tab of request properties to see the list of
page elements for current request.
Load page elements:
This option defines whether page elements (images, CSS, JavaScript and others) will be loaded during test run or not.
If you uncheck it, then the page will be loaded without images and other page elements.
However, this option is available in request properties only in case the corresponding option Load page elements
is turned on in profile properties.
If you uncheck that option in profile properties, then all pages of current profile
will be loaded without page elements.
Below you can see the list of page elements. If you do not want to request some element during test run,
just unckeck it.
You can edit the URL address of any page element: click on a desired element in
the list, modify the URL and press Enter.
Add..:
Adds a new string to the list of page elements. Specify the URL of a new element and press
Enter. Remove: Removes a selected element from the list. Select All:
Puts checkmarks for all page elements in the list. Clear All: Removes all checkmarks in the list.
User think time from _ to _
This option is available only in case you have chosen the option Specified in request
for user think time in the properties of the
current profile.
In other cases (Disable or Random from range options of user profile),
you won't be able to modify delays for
individual requests.
Specify 2 values: minimum and maximum values of delay. Then the delay for page request
will be taken from the specified range at random. You can set a constant value of delay -
specify equal limits of range.
Response processing
On the Response processing tab you can view and modify the list of variables that will be used during test run.
You can also view the recorded HTTP request and server response that was received during the recording process.
You can specify additional validation rules that will be applied to server response during test run.
Variables
You can use variables to calculate parameters and form correct URL paths. To define a variable,
you can use functions that parse actual HTML code of response at run-time.
See the topic Parameter Value Dynamic Calculation
for detailed description of
functions and function editor.
Add..:
Opens the Edit Variable dialog where you can
define a new variable and a function for its calculation.
Note that created variable will be available only in subsequent
requests. Remove: Removes selected variable from the list. Edit..: Opens the Edit Variable dialog
where you can modify the properties of selected variable: name and function for its calculation.
Recorded HTTP request and response
This section includes several tabs where you can see the recorded HTTP request and
server response that was received during the recording process.
Request: Here you can see the recorded HTTP request.
Response Header: Here you can see the HTTP header of server response.
Response Body: HTML code of server response is displayed on this tab.
You can search for some text string on any of these tabs: Request,
Response Header and Response Body.
Find:
Type the text that you want to find. The program will highlight all
occurrences of the entered text.
Use the Previous and Next
buttons to move to the previous/next occurrence of the text.
Browser View: Here you can see the server response as it is displayed in browser without images.
If the displayed web page has incorrect language encoding, you can select another encoding in the
Code page combo-box.
Validation Rules WAPT Pro can make additional validity check of server response during test run.
Server response valid if response body contains/does not contain the following text:
You can turn this option on and enter some text to check. Then WAPT Pro
will check whether HTML code of
server response contains the text that you specify here, or not.
(You can enter any part of HTML code, for example: <TITLE>302 Found</TITLE>.)
You can select one of 2 options in the combo-box: either "contains", or "does not contain".
If you select "contains", WAPT Pro will check that HTML code of
server response contains the specified text. If the program
finds the text, response is considered valid. Otherwise, it is considered invalid.
If you select "does not contain", WAPT Pro will check that HTML code of
server response does not contain the specified text. If the text is not found,
response is considered valid. Otherwise, it is considered invalid.
In case the response is invalid, you will see the "Response body validation error"
for this page request in Response codes
table of Errors Report, HTML Report and in the log.
Server response valid if response time is less than _ ms: If you check this option,
WAPT Pro will make additional validity check of response time.
The program will treat server response valid if response time is less than the value specified here.
If response time exceeds this value, you will see the "Response time validation error"
for this page request in Response codes
table of Errors Report, HTML Report and in the log.
Apply profile validation rules: This option defines whether to apply
profile validation rules to the current request or not.
First, the program applies validation rules specified for the request. After that,
if the option Apply profile validation rules is turned on, the program applies
validation rules specified in profile properties.
Find and replace a text string in request properties
When you edit a test scenario, sometimes you may need to search for some text string in the properties of all
page requests and replace it with another text string. WAPT Pro allows you to do this:
you can quickly search for every occurrence of a specific word or phrase, or
automatically replace it with another word or phrase. Use the
Find and Replace... option on the Edit menu for this purpose.
When you click this option, the Find and Replace Text dialog appears.
Find what: Type the text that you want to search for
in the properties of page requests.
Replace with: Type the replacement text.
Below you can see the list of fields where you can search for the specified text.
WAPT Pro will search in those fields that are selected in the list.
Match case:
If you check this option, WAPT Pro will search only for words that match the case of
the word or phrase that you typed in the Find what box. For example, if you search for "PAGE", the result includes
"PAGE" but not "page".
Do one of the following:
To find the next
occurrence of the text in the properties of page requests, click Find Next.
WAPT Pro looks for the text in the properties of all requests of all user profiles.
To replace an
occurrence of the text, click Replace.
After you click Replace, WAPT Pro moves to the next occurrence of the text.
To replace all occurrences
of the text, click Replace All.