Service Response Monitor › Test Management › Create Tests › HTTP Tests
HTTP Tests
The HTTP test monitors the amount of time required to log in and test a website. You can test sites directly or use a proxy. This test supports the ability to search for regular expressions on a web page and to specify the number of nested levels you want the HTTP test to traverse during a test.
SRM uses HTTP 1.1 by default for all HTTP requests. It does handle HTTP 1.0 responses.
Options and Arguments
HTTP tests require the following specific options and arguments:
- URL To Test. The hostname of the system to test.
Note: As of Service Availability r2.1 IPv6 addresses can be used, but they must be embedded in brackets, for example [0aff::230:6eff:fe4b:51db]:8080. Here 0aff::230:6eff:fe4b:51db represents the IPv6 address and 8080 represents the port number.
- URL User Name. (Optional) A user name for the site you are trying to access if the site requires Web authentication.
- URL Password. (Optional) A password for the user name you specified if the site requires Web authentication. SRM stores the password in encrypted form.
- Frame Depth. (Optional) The number of levels the test should traverse when downloading nested frames. (The HTTP test downloads all frames, images, external scripts, and applets during the page download so that the measurement reflects the user's experience when downloading a Web page.) The default value is 3.
- Text Match. (Optional) A regular expression or text string that you want SRM to match on the pages you test. The number of matches displays in the Results Field column on the Monitor page for the agent.
- Min Matches. (Optional) The minimum number of times that SRM must find the search expression (default is 1). If the search expression is not found at least as many times as you specify in this field, the test will fail (Availability=0). If this field is set to zero and the agent does not find the search expression, the Availability measurement is not affected.
- Download Content. Checking this box downloads all images, frames, scripts, and applets, with the core HTML code from the proxy site.
- Fail on Content Errors. Checking this box specifies that any errors encountered while downloading images, frames, scripts, and applets cause the test to fail.
- Use Proxy. Check this box to use a proxy server for the website being tested. If this box is unchecked the following proxy options do not display.
- Proxy Server. The hostname (the name or IP address) of the proxy server to use if the system from which you are testing does not have direct Internet access.
- Proxy Port. (Optional) The port to use on the proxy server. The default is 80.
- Proxy User Name. (Optional) A valid username to be authenticated on the specified proxy server.
- Proxy Password. (Optional) The password for the specified user name. SRM stores the password in encrypted form.
Specify these options and arguments when you create or modify tests.
Notes:
- You retype the password in the Verify Proxy Password field to verify that you have entered it correctly.
- HTTP Test supports the HTTP Basic authentication scheme and NTLM authentication. For more information consult documentation on your web server.
Examples
This section includes examples for testing web server response.
Example 1: Testing Web Server Response
Use this example to create a test that monitors the amount of time required to access the main web page at http://www.ca.com. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes).
To create a new test in a policy
- Click + (New) on the Test Monitors toolbar.
The New test pane appears.
- From the Test Type list, select HTTP.
- In the Description field, specify ca_web.
- In the Test Name field, specify ca.com test.
- In the Test Interval field, specify 60.
- In the Test Timeout field, specify 20.
- In the Samples Per Interval field, specify 1.
- In the Statistics Window field, specify 300.
- In the URL To Test field, specify http://www.ca.com. You specify the full web address, including http://.
- Accept defaults for all other fields.
- Click Save Test.
When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:
{
index=25
type=http
desc="ca-web"
dest="http://www.ca.com"
args="max_depth=3&content_dl=true&content_err=false"
interval=60
samples=1
timeout=20
window=300
tos=0
limit=0
status=active
name="ca.com test"
class=""
context=""
flags="100"
loglevel=3
}
Example 2: Testing Web Server Response through a Proxy
Use this example to create a test that monitors the amount of time required to access the main web page at http://www.weather.com. In this example, the test accesses the weather.com website through a proxy server (myproxy) that is running on port 8080. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes).
To create a new test in a policy
- Click + (New) on the Test Monitors toolbar.
The New test pane appears.
- From the Test Type list, select HTTP.
- In the Description field, specify weather.com_proxy.
- In the Test Name field, specify Proxy Test.
- In the Test Interval field, specify 60.
- In the Test Timeout field, specify 20.
- In the Samples Per Interval field, specify 1.
- In the Statistics Window field, specify 300.
- In the URL To Test field, specify http://www.weather.com. You specify the full web address, including http://.
- In the Proxy Server field, specify myproxy.
- In the Proxy Port field, specify 8080.
- Accept defaults for all other fields.
- Click Save Test.
When you commit your changes, SRM adds an entry similar to the following to the svcrsp.cf file:
{
index=26
type=http
desc="weather.com_proxy"
dest="http://www.weather.com"
args="max_depth=3&content_dl=true&content_err=false&proxy=myproxy:8080"
interval=60
samples=1
timeout=20
window=300
tos=0
status=active
name="Proxy test"
class=""
context=""
flags="100"
loglevel=3
}
Example 3: Matching Web Server Content
Use this example to create a test that downloads the web page at http://www.weather.com and searches the content for the regular expression, "cumulus." SRM records the number of times that this expression appears in the Results field for the test. This example tests the server once every 60 seconds and waits up to 20 seconds for a successful response. It calculates response time and availability statistics over the last 300 seconds (5 minutes). You can use a similar example to test content for the HTTPS Tests tests by specifying the HTTPS test type and a secure web server.
To create a new test in a policy
- Click + (New) on the Test Monitors toolbar.
The New test pane appears.
- From the Test Type list, select HTTP.
- In the Description field, specify weather.com_content.
- In the Test Name field, specify Test Web Content at http://www.weather.com.
- In the Test Interval field, specify 60.
- In the Test Timeout field, specify 20.
- In the Samples Per Interval field, specify 1.
- In the Statistics Window field, specify 300.
- In the URL To Test field, specify http://www.weather.com. You specify the full web address, including http://.
- In the Frame Depth field, accept the default of 3 to search through 3 layers of the site for the search text.
- In the Text Match field, enter cumulus.
- Accept defaults for all other fields.
- Click Save Test.
When you commit your changes of the test, SRM adds an entry similar to the following to the svcrsp.cf file:
{
index=27
type=http
desc="weather.com."
dest="http://www.weather.com_content"
args="max_depth=3&search=cumulus&minmatch=1&content_dl=true&content_err=false"
interval=60
samples=1
timeout=20
window=300
tos=0
limit=0
status=active
name="Web server content"
class=""
context=""
flags="1"
loglevel=1
}
For information about errors you may encounter when running HTTP tests, see HTTP Test Error Codes.
Copyright © 2013 CA.
All rights reserved.
|
|