URLHammer takes a number of command line arguments so that you can implement your tests in the manner that best fits your site. Use the following syntax:

java atg.core.net.URLHammer URL | script_pathname threads iterations
[optional arguments]

The following URLHammer arguments are required:

Required Arguments

Description

URL or script_pathname

The URL to use in each request. The URL must begin with http://. (Note: https is not supported.) If you use the -script argument, then instead of a URL, specify the pathname of the script to execute. See The -script Argument.

threads

Number of independent thread connections to create to the HTTP server. Use a value from 1 to 20. All threads run concurrently.

iterations

Number of requests to issue on each thread. If the -script argument is used, this represents instead the number of times each thread executes the entire script.

The following URLHammer arguments are optional:

Optional Arguments

Description

-addCookie name=value

Enables you to set a cookie. For example:

-addCookie FOO=Zippy

-addHeader name=value

Enables you to define a header. You can define multiple headers; for example:

-addHeader LOGIN=Zappa -addHeader PASS=nan00k

-cookies

Returns Set-cookie headers sent by the server. Note: path= and expires= are not processed by URLHammer.

-htmlStats HTML file

Output statistics to the specified HTML file. This argument gives detailed statistics about the amount of time consumed by each individual URL you requested. It also gives summary statistics about the number of errors encountered. By default, URLHammer outputs these statistics to the console.

-maxRequests

Limits the number of redirects that can be generated.

-nopause

Use only with the -script argument. Ignores pause information in script files by default. When using the Recording Servlet, the time between the server’s receipt of one page request and the server’s receipt of the next request is recorded in the script file (in milliseconds). Each URLHammer thread sleeps for this number of milliseconds before requesting the URL. If you use the -nopause argument, URLHammer instead requests each subsequent URL as soon as the previous output is received.

-password

Use only with the -user argument. Supplies a user password if needed to log in to any pages.

Note: Entering passwords as command line arguments entails some security risks. Do not enter passwords as command line arguments in situations where security is a top priority.

-pause

Use only with the -script argument. Pause for the specified time between each request (number of milliseconds). For example, the following argument causes URLHammer to pause 1 second between each request:

-pause 1000

If you use a negative value, then URLHammer pauses for a random amount of time, not to exceed the absolute value of the value you use. For example, the following argument causes URLHammer to pause a random amount between 0 and 550 milliseconds between each request:

-pause –550

-randomStop

Simulates the browser’s stop button by randomly closing the connection to the server for 20% of the requests.

-recordAll

Outputs statistics for each request. Use this argument with the
-htmlStats argument and the HTML file will contain the statistics broken down for each request, as well as in summary form. It also keeps track of which requests had errors and prints (error) next to the time for that request.

-runningStats

Prints information periodically for each thread. This allows you to get an idea of how long runs are proceeding.

-script

Instead of making a request to a single URL, each thread instead executes a script of user browser actions. See The -script Argument.

-server name:port-number

Name of the server and the port number to use if you are using the -script argument. If you do not specify a server, localhost:80 is used as the default.

-stop <n>

Simulates the browser’s stop button by closing the connection to the server for <n>% of the requests. This argument is useful to make sure that your site is robust with respect to aborted requests.

-substitute

Use only with the -script argument. Performs keyword substitution in your script file. This facility allows you to generate more flexible form processing scripts. You can place keywords __RANDOM__, __COUNTER__, and __TIME__ into your script file’s URLs and POST data sections. (Note that these keywords are preceded and followed by two underscore characters.)

Before each request, URLHammer substitutes these keywords with a random string, a continually incremented counter, or the current time in milliseconds. You can use this argument, for example, to generate unique login IDs when load testing login forms.

-user

Use only with the -password argument. Supplies a username if needed to log in to any pages.

-verbose

Dumps the complete output of the request (including request headers). This argument is very valuable when testing a new script or the first time you execute a command, so that you can inspect the output generated.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices