File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes Load and stress testing a Java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Load and stress testing a Java application" Watch "Load and stress testing a Java application" New topic
Author

Load and stress testing a Java application

Chris Stewart
Ranch Hand

Joined: Sep 29, 2001
Posts: 124
I have an application I've built that has load balancing built into it. I'm looking for a tool that I can use to simulate load against the application to watch the load balancing as it works. I downloaded WAPT, which is a really nice tool, but what it does is grab the HTTP requests made during the recording of browser actions. So, when I run it during the recording, the request gets sent to a specific server, as it should. The problem is that server is now statically defined in the script and when the script is run, ALL requests go directly to that machine instead of being load balanced.

Has anyone run into this before? Any suggestions on a tool I can use to simulate mouse clicks, instead of simply simulating HTTP requests?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Have you looked at Grinder?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Chris Stewart
Ranch Hand

Joined: Sep 29, 2001
Posts: 124
Grinder looks nice but also appears to simply record HTTP requests for playback. I'm starting to think I'm going to need to write something custom to do this the way I need it done.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Why not treat your recorded request as a template and substitute various values in it to be run by separate Threads.

Bill
Chris Stewart
Ranch Hand

Joined: Sep 29, 2001
Posts: 124
There's a level of logic that determines the URL of a link on the screen. That URL changes for every request based on server load on the various machines in the background. What I'm really trying to test is the logic that determines that URL. All of the load testing packages I've found just don't do that. They simply record HTTP requests and replay them. In my case, it's not doable.

I ended up writing an app that simulates all of this in code. It's working great and the application is distributing the load as I'd expected it would. I appreciate the replies.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Load and stress testing a Java application