.
Developer Spot - Web Development Tutorials
arrowDeverloper Spot  Tutorials  JAVA  Eye On Performance: A Load Of Stress 
 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Web Development News
PHP Manual
Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

Eye On Performance: A Load Of Stress

By Jack Shirazi & Kirk Pepperdine
2004-01-22
Reader Rating: 5 out of 5
Bookmark Print Version
One size doesn't fit all

Unfortunately, there is no generic stress test tool, because every application is different in what inputs it takes and how it deals with them. But for many J2EE applications, communications from the client arrive at the server using the HTTP protocol. Fortunately, there are many load testing tools that can simulate user activity over HTTP in a controlled and reproducible manner. These range from free tools, such as Apache JMeter, The Grinder, and PushToTest, to quite expensive tools such as Mercury Astraload. Typically, you get what what you pay for -- the more expensive the tool, the more it can do. To understand the differences, let's consider first what the most basic type of load test tool does.

If you were building your own load test tool, then you likely would start by writing a program that runs one thread per simulated client. Each thread would need to communicate with the server, probably using the java.net.URL classes. This approach would give you a bare-bones HTTP client simulation that could do GETs and PUTs. All each thread needs to do is send an HTTP request, collect the answer, wait some time (simulating "think time"), and repeat. The sequence of actions can be quite easily extracted into a separate configuration file. And presto, you've got a basic load testing tool. You will probably need to add some configuration options for how many threads (simulated clients) to run and whether they all start together or slowly increase the load. And, of course, you'll want to time the interactions with the server, because this is at the core of what you are trying to measure.


Article Pages:
Stress testing and the factors that go into choosing the right tool for your project
Stress testing, load testing
One size doesn't fit all
If it were only that easy...
A rich feature set
The final word
Resources

First published by IBM developerWorks


 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:

» Build and Implement A Single Sign-On Solution

» Scheduling Recurring Tasks In Java Applications

» A Brief History Of Garbage Collection



 
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML
More Resources: Web Hosting Articles - Web Development News - PHP Manual