| Transaction Id | Response Time | Successful? |
The Ajax Performance Test Client is a demonstration of three "Web 2.0" projects brought together to create a basic test client for a developer to test the responsiveness of their AJAX endpoints. This is DEFINITELY not a replacement for full scale production load testing software, but more a chance to mix and match some cool libraries to show it can be done.
The first technology that makes this possible is the YUI libraries, more explicitly the Connection Manager class. This class performs the connectivity, and with its use of a transaction ID on each request, makes this whole thing possible. Since AJAX requests are asynchronous, the order with which they return to the client is not guaranteed. The transaction ID allows us to track the start time and end time of each request.
The second technology at work is Jack Slocum's Web 2.0 layout library which gives us the overall layout with the tabs and status panel. The third technology at play is Walter Zorn's javascript vector graphics library to create the chart, and the progress bar.
To perform a test, enter an AJAX endpoint in the URL field in the "Testing Requests" box. Then set your delay between requests, the number of requests, and the request type. If you select POST, you will need to enter a semi-colon separated list of field-value pairs in the Request Parameters field. If you select a GET type, you can still use the Request Parameters and they will be appended to the URL string. You do not need to enter the same number of request parameters as requests. For example, if you enter 50 requests, and only 10 request parameters, each parameter string will be used 5 times.
When you are all set, click the "Start Test" button and when the test is complete, the application will auto-tab over to the "Test Results" tab. There will be a table-ized summary of each request's performance, and a chart of all requests.
Currently, the Credential Request function has not been added, but it is nothing more than send credentials to the end point on the first request and waiting for a successful response, at which point it would start the test.
There is a function within the "perfTest" javascript object where you can create a custom function to parse through each requests response text to determine if it was successful. There is also an option in the Request Parameters section to create unique URLs for every request. This is in place to prevent server caching that you may not want to allow.
You need to be aware that browsers inherently have limitations on how many concurrent connections you can have at any point in time. Firefox has an easy way to up this number, but the method for IE is a little more involved. You can get more details on the methods here