About
Community
|
Advanced HTTP Tester
|
The Advanced HTTP Tester's purpose is to
control the logic of sampling web URL's.
- Enable cookies
- By clicking the checkbox enabling cookies, you enable JMeter to store and return cookies to and
from your test pages. Optionally, if you configure the cookies setup, you can select a Netscape-style cookie file to start JMeter off
with any cookies you like.
- Enable authorization
-
By selecting this checkbox, you enable JMeter to enter authorization information (for pop-up style authorization requests)
if it is requested by the webserver.
Hit "Configure" and enter in your authorization information.
If you are using forms-based authorization, you will have to manually configure a Test Sample to hit that page with the
appropriate arguments. Please be sure to click the "only hit this URL once" checkbox for the Test Sample (so that JMeter doesn't
repeatedly sample the authorization page).
- Create and edit test samples
- using the drop down select list, choose a type of test sample you wish to create, and click the "create" button.
As you create more and more, they will be added to your list. To
edit one, simply select it from the list, and click the "edit" icon. To delete samples, select all the samples you
wish to delete, and click the trashcan icon.
Additionally, if you have added a SAX XML parser to your classpath (such as xerces.jar), you will see two additional icons -
for save and load. To save all the test samples, hit save and choose a directory and filename to save to.
Note:JMeter creates a directory called "testsamples" within the directory you select, and each Test Sample is saved
in an individual file within this created directory. The file you specifically selected is an "script" file that lists all the
Test Samples that it contains - but it simply contains pointers to the individual Test Sample files. This allows you to save large
lists of Test Samples, and still be able to use them separately from each other as you like. Currently, JMeter overwrites files
without warning you, so be careful.
Test Samples available:
|
HTTPBaseTestSample
|
HTTPBaseTestSample requires the following input:
- URL
- Enter the URL of the page you wish to test. Do not include any argument-value pairs
- GET or POST
- Select either the GET or POST checkbox to indicate the method that should be used to sample the URL
- Hit URL once only
- Indicate to JMeter if you wish this URL to be dropped from the sample list after it is first sampled. This can be used for
login pages so that JMeter will login once, but will not do so repeatedly.
- Interleave
- Indicate to JMeter that multiple test entries generated from this test sample should be
sampled one-at-a-time - ie interleaved with entries from other test samples. This is
relevant only if multiple argument values have been entered for one or more arguments.
- Select one or more thread groups
- This test sample will be part of whichever thread groups you select here.
- Arguments
- You may add as many name-value pairs as you wish here. Be sure to hit
Enter after your last entry since it is
possible to enter a value into the table, and then click "OK" with the mouse. Although the value
is saved in the table, JMeter will not see it until you hit Enter . This is a bug.
It is also possible to enter multiple values for a single argument name. The easiest way to do this
is to select a row and then hit the "edit" button.
This will pop up a dialog by which you can add as many values as you like to the field. Another way to do it is enter
multiple values, each quoted and separated by commas.
If you enter multiple values for a field, JMeter will create separate test entries automatically for
each possible combination of name-value pairs. This is a time-saving device. An example of use would
be if you wish to test a search script, and you want to test a large number of different search strings.
Normally, you would have to create a new test sample for each search term, even though the URL, the method,
and all the other arguments are the same across all the test samples. Using this method, however,
you only need to create one test sample, and load the search string argument with multiple values.
If your test sample has multiple values, AND you've selected "Interleave", JMeter will use just
one of the combinations to sample each time through the list of test samples (it's not random, they still go in
succession). Otherwise, JMeter will
do all the combinations each time the test sample comes around.
|
|