Winslam!::Documentation
 
WinSlam! Help Index
Topics (Click on the image at any time to return to the index...)
What is WinSlam!?
WinSlam! Configuration
    Static name/value pairs
    Dynamic name/value pairs
        Numeric values
        Text values
        ODBC Query results
        GUID values
    Main parameter configuration
    HTTP Header/browser configuration
    FORM POST/GET configuration
    ODBC query configuration
Running WinSlam!
Interpreting the output
Configuring WinSlam! for performance
Common error messages

How Do I?

Mimik a particular browser?
Send a cookie?
Send an HTTP POST?
What is WinSlam!?

WinSlam!© is your standard Web test application, originally written as experiment in Win32 GUI programming. WinSlam! will perform any number of HTTP GET or POST requests while sending HTTP headers and FORM POST/GET data entered by the user.

The data can be entered as static name/value pairs (remain unchanged from request to request) or as dynamic name/value pairs (new values are generated for each request).

WinSlam! allows the user to see any of the following output:

  • The GET/POST request sent to the server
  • The HTTP headers returned from the server
  • The HTML response returned from the server

WinSlam! can be used as a load tester by configuring it to spawn between 1 and 128 threads, all of which perform GET or POST requests simultaneously. The rate of request can also be configured to determine the load on the server.

WinSlam! can be configured to read data from a database (via ODBC) and can use the results as dynamic test data in the GET/POST requests.

WinSlam! also allows the user to mimik some of the more popular Web browsers by sending the browsers HTTP headers along with the request, which allows the user to see the response being returned from a Web server for a number of browsers.

Once WinSlam! is configured, the configuration parameters can be written to disk as ".wsl" files and read in later to repeat the same tests more than once.

WinSlam! Configuration

This topic covers configuring WinSlam!.

There are 4 main areas of configuration for WinSlam!.

The Url, all HTTP headers, and all FORM/POST data can be configured as either static data (name/value pairs or single values) or dynamic data (name/value pairs or single values).

Static name/value pairs

This topic covers using static name/value pairs with WinSlam!

HTTP Headers, FORM POST/GET data, and the Request Url are configurable as either static data or dynamic data.

If any of the above data is static, it will be the same with each HTTP GET/POST request that is made by WinSlam!.

Static data can be either name/value pairs (add a value for both "Name:" and "Value:" edit boxes):

domain=.suck.com
id=345

...or single values (add a value for the "Value:" edit box only - leave the "Name:" edit box empty):

Salon
secure

These name/value pairs are sent with each HTTP GET/POST request made by WinSlam!, and will appear in a GET request something like:

http://..../index.html?domain=.salon.com&id=345&Salon
Dynamic Name/value pairs

This topic covers using dynamic name/value pairs with WinSlam!.

HTTP Headers, FORM POST/GET data, and the Request Url are configurable as either static data or dynamic data.

When a parameter is configured as dynamic data, it's value will change with each HTTP request made by WinSlam!. For example, if a FORM requires an integer value between 1000 and 1005 to be sent when the FORM is submitted, WinSlam! can be configured to send this value dynamically via syntax similar to:

[INT, 1000, 1005]

or

id=[INT, 1000, 1005]

The following dynamic data types are supported:

Numeric dynamic name/value pairs

This topic covers specifying numeric dynamic data.

The following numeric dynamic data types are supported by WinSlam!:

  • Integer
  • Float
  • Long

Here are some syntactical examples of how to specify these values:

  Generate a random integer value with no corresponding name:
[INT]
Generate a random integer value with the name id:
id=[INT]
Generate a random integer value in the range [34..56] with no corresponding name:
[INT, 34, 56]
Generate a random integer value in the range 100..112] with the name "pid":
pid=[INT,100,112]
Generate a random float value with corresponding name "fid":
fid=[FLOAT]
Generate a random float value between 3.4 and 92.1 with no corresponding name:
[FLOAT, 3.45, 92.1]
Generate a random long value with no corresponding name:
[LONG]
Generate a random long value in the range [0..1500000] with the name "l":
l=[LONG, 0, 1500000]
Textual dynamic data

This topic covers the use of textual dynamic data.

The following options are available when specifying textual dynamic data in WinSlam!:

  Generate a random string of text 12 characters long with no corresponding name:
[TEXT,12]
Generate a random string of text 16 characters long with the name "uname":
uname=[TEXT,16]
Generate a random string of test 32 characters long, beginning with the string "start_" with a name of "uname":
uname=[TEXT,32, start_ ]
Generate a random string of text 40 characters long beginning with the string "start_" and ending with the string "_end", with no corresponding name:
[TEXT,40,start_ , _end]
ODBC Results as dynamic data

This topic covers using ODBC query results as dynamic data.

WinSlam! can be configured to execute a query against a database (via ODBC) and have the results be used as dynamic data to be sent with each HTTP GET/POST request made by WinSlam!.

Here are some syntactical examples of how to use query results as dynamic data:

  Use the query result in column 0 (the first column of the result set):
[RS,0]
Use the query result in column 1 (the second column of the result set) and POST/GET this data with the name "username":
username=[RS,1]

For example, if your query was:

SELECT username, password, user_id from users (NOLOCK)

You could include the following name/value pairs as part of your FORM POST/GET configuration:

username=[RS,0]
password=[RS,1]
userid=[RS,2]
Specifying a GUID value

This topic covers specifying a GUID value as dynamic data.

Here are some syntactical examples of how to specify a GUID as dynamic data:

  Send a single GUID value:
[GUID]
Send a GUID name/value pair with the name _guid:
_guid=[GUID]
Main configuration parameters

This topic covers main configuration parameters (Host/Port/Url)

From the main menu, select "Configure" -> "Parameters/Url". Within this dialog box, the following parameters may be configured:

  • Url: The is the Url that will be requested in the GET/POST requests made by WinSlam!. This value can be any of the following types:
    1. A static string (eg: "/index.html")
    2. Dynamic textual data (eg: "[TEXT, 12, /, ..html]" )
    3. Dynamic ODBC Query results (eg: "[RS,1]" ).
  • Port: The port to connect to on the server to be tested.
  • Host name or IP address: The name of the server to be tested, or it's IP address.
  • Total Hit Count: The total number of HTTP requests to be performed against the server being tested.
  • ThreadCount: The number of threads to spawn to make concurrent HTTP requests. This is an integer value between 1 and 128.
  • Avg. Sleep time(ms): The average time a testing thread should sleep between successive HTTP GET/POST requests. During the actual test, each thread will sleep a random time, in milliseconds, between 1 and this Average Sleep Time number.
  • View Send request: This checkbox indicates if WinSlam! should display the HTTP Send request being made to the server to be tested - as the request is being made, or whether WinSlam! should display nothing.
  • View Raw Server Response: This checkbox indicates if WinSlam! should display the HTML response received from the server, or whether WinSlam! should display nothing.
  • View Server Response Headers: This checkbox indicates if WinSlam! should display the HTTP response headers being returned from the server, or whether WinSlam! should display nothing.

At any point the default configuration can be restored by selecting "Configure" -> "Clear/Default".

Configuring HTTP headers (Browser type)

This topic covers specifying which HTTP headers are sent with each request.

Adding Individual HTTP Headers

From the main menu, select "Configure" -> "HTTP Headers" from the main menu. Within this dialog box, you can add either single values or name/value pairs of arbitrary HTTP headers to be sent with each HTTP GET/POST request.

For example, to send a Cookie with the name id and the value 23, add the following HTTP header by keying it into the "Header Value" edit box and selecting "Add":

Cookie: id=23

As another example, to send a browser string "Mozilla/3.0", add the following entry to the HTTP header list:

User-Agent: Mozilla/3.0
Configuring WinSlam! to mimik a particular browser:

To send all of the headers associated with a particular browser, select "Configure" -> "HTTP Headers" from the main menu. Select the browser you want to mimik from the "Add headers for a particular browser" drop-down list. Then click "Add":

FORM POST/GET data

This topic covers specifying FORM POST/GET data

From the main menu, select "Configure" -> "FORM POST Data". Within this dialog box, you can add either single values or name/value pairs of data to be sent with each GET/POST request. The name/value pairs (or values) can be either static data or dynamic data.

To add a single value, just key the value into the "Value:" edit box and click "Add".

To key in a name/value pair, key the name into "Name:", the value into "Value:" and click "Add".

The HTTP GET request for the following set of name value pairs:

domain=.salon.com
username=slappy
id=47

...would look something like the following:

http://.../index.html?domain=.salon.com&username=slappy&id=42
ODBC Configuration

This topic covers ODBC configuration.

Select "Configure" -> "ODBC" from the main menu. The following parameters must be entered for ODBC to work properly:

  • ODBC DSN: The ODBC datasource name to use when executing the query.
  • Username: The username to use when connecting to the database server specified in ODBC DSN.
  • Password: The password to use when connecting to the database server specified in ODBC DSN.
  • Query: The query to execute. The query results can be used as dynamic data values by specifying query result name/value pairs or single data values.

The DSN/username/password can be tested by selecting "Test ODBC", which will attempt to connect to the database server via the specified DSN/username/password. If there is a failure to connect, the SQL server status code and error message ' will be displayed.

The ODBC Test does not attempt to execute the given query - it only checks the connection.

Running WinSlam!

This topic covers how to run WinSlam!.

Once WinSlam! is configured to run, select "Start" from the main screen to begin testing. Fatal testing errors will be displayed in the "Request Sent" edit box. Examples of fatal errors are:

  • Host name not found. (DNS could not resolve the host name into an IP address).
  • Unable to connect to host.(The server is not listening on the PORT specified)
  • Socket timeout error. (The server is accepting socket connections but not responding)

Once WinSlam! is running, the test can be Paused or Stopped via these buttons on the main screen. if it is Paused it can be started from where it was paused or started over. If it is stopped it can only be started from the beginning.

See interpreting the output for notes on interpreting the programs output.

See common errors for notes on some common WinSlam! errors

Interpreting the output

This topic covers how to interpret he program's output.

Interpreting the "Request sent" output:

Typical output for an HTTP GET looks something like the following:

[0|1|2] Sent: [GET /index.html HTTP/1.0
 
]

"[0|1|2]" indicates the following testing thread statistics:

[ Thread ID | Hit number being performed | Total hits the thread will perform ]

"Sent: [ .... ]" indicates the HTTP request made to the server, with the actual request being between the [ and ] brackets. This is true for both HTTP GETs and POSTs.

Typical output for an HTTP POST looks something like the following

[0|1|2] Sent: [GET /index.html HTTP/1.0
 
]

and

[domain=.salon.com&appRedirect=http://www.suck.com]

"[0|1|2]" and "Sent: [ .... ]" indicate the same as they do above.

"and []" indicates additional data, if any, that was sent to the server after the initial request, with the actual data between the [ and ] brackets. This is true for POSTs only (no additional data is sent for GETs).

Interpreting the "HTTP Headers Received" output:

Typical output looks something like the following:

[0|1|1] Hdrs: [HTTP/1.0 200 OK
Server: Netscape-Communications/1.1
Date: Tuesday, 16-Mar-99 00:43:52 GMT
Log: false
Content-length: 24739
Expires: Tuesday, 16-Mar-99 00:48:52 GMT
Content-type: text/html]

"[0|1|1]" indicates the following testing thread statistics:

[ Thread ID | Hit number being performed | Total hits the thread will perform ]

"Hdrs: [ ... ]" indicates the HTTP headers received by the server, with the actual headers between the [ and ] brackets.

Interpreting the "HTML Response Received" output:

Typical output looks something like the following:

[0|1|1] Recv: [<html>
<head>
<title>Salon.com</title>
<link rel="stylesheet" type="text/css" ....]

"[0|1|1]" indicates the following testing thread statistics:

[ Thread ID | Hit number being performed | Total hits the thread will perform ]

"Recv: [ ... ]" indicates the HTML response received by the server, with the actual response between the [ and ] brackets.

Interpreting the "Test Data" output:
Interpreting the "Status" output:
  • Test Thread: Running indicates that the test is active and is running
  • Test Thread: Paused indicates that the test is active but paused.
  • Test stopped... indicates that the user input has been received and WinSlam! is waiting for the testing threads to shut down so the test can exit.
  • Test thread: Exiting indicates that the test is no longer active.
Configuring WinSlam! for performance

This topic covers configuring WinSlam! for performance

The less output that WinSlam! has to display, the quicker it will run. WinSlam! is also constrained by the size of your network pipe.

The main performance indicator is "Hits/second" on the main screen. The more hits/second, the more load WinSlam! is putting on a server.

What this means is that for optimum performance, uncheck all three of (under the main parameter configuration):

  • View Send request: Display the send request
  • View Raw Server Response: Display server HTML response
  • View Server Response Headers: Display server response HTTP headers

Other parameters that will control how much load WinSlam! can put onto a server are also found under the main configuration parameters dialog box:

  • Total Hit Count: The total number of HTTP requests to be performed against the server being tested.
  • ThreadCount: The number of threads to spawn to make concurrent HTTP requests. This is an integer value between 1 and 128.
  • Avg. Sleep time(ms): The average time a testing thread should sleep between successive HTTP GET/POST requests. During the actual test, each thread will sleep a random time, in milliseconds, between 1 and this Average Sleep Time number.

Some faster machines can have a thread count as high as 75 or 100 and not suffer a lack of performance due to context switching of testing threads. Other machines (older /slower) perform optimally with only 5 - 10 threads, each sleeping for a very small interval (~5ms) between successive HTTP requests.

To simulate a large number of users (but not a very heavy load), use 128 threads with a large sleep interval (~2000 - 3000 ms).

See interpreting the output for notes on interpreting the programs output.

Common errors

This topic covers common WinSlam! errors.

On the main WinSlam! screen:
Missing/invalid host value

On "Configure" ->. "Parameters/Url" dialog box:
Missing value(s): Host

On "Configure" -> "HTTP Headers" dialog box:
Missing header value Name/value pair syntax error:

On "Configure" -> "Form Post Data" dialog box:
Invalid value value (illegal characters or invalid length)
Invalid name value (illegal chars [,;=%])
Name/value pair syntax error:

On Configure" -> "ODBC/" dialog box:
Missing one of: ODBC DSN, Username, Password

While running WinSlam!:
ERROR: Socket Init error [WSAHOST_NOT_FOUND]

How Do I: Mimik a particular browser?

This topic covers mimiking a particular browser using WinSlam!.

WinSlam! was developed with the intention of being able to mimik many browsers. Unfortunately, due to the profound lack of network sniffers available to me, WinSlam! only has data to mimik 2 browsers:

  • Internet Explorer 4.01 for Windows NT 4.0 SP3
  • Netscape Communicator 4.07 for Windows NT 4.0 SP3

Step 1) Select "Configure" -> "HTTP Headers" from the main menu.

Step 2) At the bottom of the dialog box, select the browser you would like to mimik from the drop-down list in the Add Headers For A Particular Browser section.

Step 3) Once the browser is selected, click the Add button to the right of the drop-down list.

NOTE: You may have to edit a couple of the headers once this is done, since some of them are specific to the site you'll be running WinSlam! against. A dialog box will prompt you with the necessary information.

How Do I: Send a cookie?

This topic covers sending a cookie with your HTTP GET or POST request using WinSlam!.

Step 1) Select "Configure" -> "HTTP Headers" from the main menu.

Step 2) In the Header Value dialog box, type the name and value of your cookie preceeded by the string "Cookie: ".

For example, to send a cookie named "GUID" with a value "{0123456789ABCDEF}", enter:

Cookie: GUID={0123456789ABCDEF}

Step 3) Click the Add button below the edit box.

You will be able to see your cookie being sent with each HTTP GET or POST in the "Request Send" edit box of WinSlam!s main screen.

How Do I: Send an HTTP POST?

This topic covers sending an HTTP POST using WinSlam!.

Step 1) Select "Configure" -> "Parameters/Url" from the main menu.

Step 2) Select "Perform HTTP POST".

See interpreting the output for notes on interpreting the programs output.