Web Application Load Simulator
LoadSim is a web application load simulator. It allows you to create simulations and have those simulations run against your webserver.
While I have used and followed quite closely several open source projects this is my first attempt at actually managing one. Please bear with me as I learn both the ins and outs of managing such a project as well as how to best manage one using the SourceForge website.
LoadSim began life after I spent a frustrating several weeks trying to load test a consulting client's web site. The web-based application was fairly complex and to get as accurate information as possible I wanted to be able to faithfully recreate the usage patterns of real users. Nothing I could find in the free software world seemed to fit the bill and commercial products were prohibitively expensive and in many cases offered many features that we didn't need.
My search did uncover JMeter, which I used for some basic load testing. JMeter will let you pound a way at a website with some number of virtual users. It's shortcoming, at least for the application being tested, was that every virtual user would submit the same exact links with the same exact form and querystring data. Because the functionality of JMeter was close to what I needed I started reading through the JMeter source code and found the core simulation engine to be a good starting point for what would become LoadSim. I took the JMeter engine, as well as JMeter's cookie manager, modified them, and added some Tcl extensions so that I could script highly dynamic simulations. To help analyze the results I added some basic statistics routines. Finally, I added some rough support for generating HTML pages that could summarize the results.
Anway, when I looked up I thought I had a pretty useful tool and decided to release it under an open source license.
Between the first version and the one I am working on now a good deal has changed. Most importantly, the way simulations are specified has undergone substantial change. Instead of using Tcl to specify the simulation you now do it by creating an XML file. I made this change because I found the Tcl approach to be a bit cumbersome and wouldn't support a GUI frontend very well, which is something I would like to add in future.
LoadSim is currently in a pre-alpha state. What that means to me is that most of the functionality is present, but not much testing has taken place. Most of the following features are already implemented but some, most notably the statistics and publishing, are in a fairly rough state and are not very usable. By the full release, however, the following feature set will be supported:
- 100% Pure Java. All you need is JDK 1.2.2 or greater and the jar file.
- Supports cookies.
- Web applications can result in a lot of data moving between a user's browser and a webserver. To support the complexities of passing this data between the 2 systems the following methods are available for specifying querystring and form data:
These methods allow you to very accurately recreate usage patterns of real users, without having to modify your web application to support testing.
- Predefined datasets. This method is most appropriate for form data, where you want to simulate different virtual users typing data into forms.
- Page data. Basically, the next link can access certain data from the page just downloaded. This allows you to simulate users of sites where a URL encoded session ID is used, as opposed to a cookie based session ID.
- Constant data. This is just data that never changes for a link during the course of a simulation run.
It should be noted that when using page data you will be able to simulate fewer virtual users per machine. The reason for this is that the downloaded pages must be parsed and the anchor and form elements must be extracted so that the data can be retrieved. This takes up CPU time, whereas both constant and dataset link data require no such parsing.
- Remote management of simulations. Remote simulations can be created and managed on from a single management console. The console is basically a Tcl shell with some extra commands added to create, start, stop, etc. simulations. In the final release you will also be able to use this shell to calculate and publish the statistics for the simulation run(s).
- XML format for simulation specification.
- The following raw data is currently gathered: time-to-first-byte (TTFB), time-to-last-byte (TTLB), and total download time.
- Various stats can be calculated based on the raw data.
- Results can be published as HTML pages. Tables and charts will be supported in the final release.
Random delays can be added between links to simulate real users.
LoadSim would not exist without a lot of help from other open source projects. Here is a list of projects I would like to thank for making some really great software freely available.
Anonymous CVS Access
This project's SourceForge CVS repository can be checked out through anonymous
(pserver) CVS with the following instruction set. The module you wish
to check out must be specified as the modulename. When prompted
for a password for anonymous, simply press the Enter key.
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/loadsim login
cvs -z3 -d:pserver:email@example.com:/cvsroot/loadsim co modulename
You can also browse the CVS respository.
Subscribe to the mailing lists.
There is currently no user documentation. I will be trying to rectify that as quickly as possible. Over time I will be adding not only comprehensive documentation for LoadSim specifically, but also more general testing documentation. I would also like to provide as many links to other sites devoted to testing. If anyone knows of any useful links, please let me know.
I do have some JavaDoc, however.