views:

56

answers:

3

I have the desire to benchmark a Client/Server application (GUI) written in Java, on a Windows platform. I'm doing this so I can identify where the Application platform will break when scaled to 100s of users. This is not my application, I do not have source code.

I know packages like selenium exist for web apps, but I haven't seen anything for a Desktop application.

Any ideas?

+1  A: 

You can profile the application using a variety of Java performance management tools :

JProfiler

VisualVM

JConsole

Depending on what type of data you're collecting, you can also enable various command line options for the java process itself. For example, if you're interested in seeing how hard the garbage collector is working, simply run your java process as :

java -Xloggc:D:/log/myLogFile.log -XX:+PrintGCDetails myProg

and open the file with something like the HPjmeter Console.

Without knowing more about the application you're profiling, its hard to give advice on where to start. With any application executing on any computer, you have 4 quadrants to consider : CPU, Memory, I/O, Network. Sometimes improving the scalability in 1 quadrant reveals a bottleneck in some other quadrant. I usually start by looking at the top 10 methods that my application spends its time executing, and asking if I can somehow improve the algorithms within those methods.

Amir Afghani
Ah definitely helpful. I was looking for ways to simulate load, however I would have to do this anyway to collect application telemetry. Thanks! Anyone else with suggestions?
Israel Lopez
To simulate load, you can use Jakarta JMeter.
Amir Afghani
A: 

Yourkit is probably the best Java profiler in the market right now. It's not free but is an exceptional tool.

Thimmayya
+1  A: 

Your question is a little ambiguous. I think you are trying to say that you have one desktop app that has many external connections ("Users") using something else (Web browser?).

Otherwise you could mean that you have a desktop app that you are distributing to many users and it connects to a central server--but then what you really mean is that you want to test server performance so I'm guessing that's not it.

Anyway, if my first guess was right, this can be a kind of difficult program.

When I've had to do something like that, I wrote a program to simulate clients connecting and ran it on a different computer. This can work if your data is fairly simple.

If my guess is correct I might be able to offer you a few more tips--maybe if you posted a little more info

---------------------- Edit after comment

What I would do is try to come up with a minimal constant xml message you could send (like the one that you posted) then write a program to open a socket, send the xml and close it. You may have to handle the server response.

I've done this before, it might take a couple days to write a program to do it--the problem can be emulating multiple machines. I'd just try opening multiple connections from a single machine first and if that works you're good to go.

If not (Sometimes each "client" needs a different IP address) you can use Linux (this can't be done easily on windows) set up to act as though one box has different IP addresses. I think you even supply the IP address in your program as you are opening the port, but it's been a few years so this is a little wishy-washy.

Solution #2 (Mentally easier but manually intensive):

If you have a bunch of clients sitting around, you can drive your program with an interesting tool called "AutoHotKey". It's a hacky tool but it's awesome for driving GUI programs. You could record a single AHK script that loops and causes some action on the server, copy it to all the computers and start it running on each one.

There are also a bunch of Very Expensive Tools designed to manage this kind of test. You are getting into an area that I'd call one of the more challenging areas that professional QA people typically encounter.

If you get this to work, however you solve it, put it on your resume.

Bill K
Sorry about that. Here is my response. I have a Inventory Control platform, commercial software. The vendor probably does not spend enough time load testing their system. The application sits on a Firebird Database, the Server is Java application that handles transactions into the Database over XML sockets, the XML syntax is not known its handled via <event=104><data>BASE64IthinkRepresentation</data></event>. The client is a GUI Desktop Application that interacts with the users of the system.I do want to test server performance, but right now all I know is the Client GUI as an interface.
Israel Lopez
Gotcha, sounds good. In my sleep last night I completely ignored that the software as an XML SDK, it may not fully emulate all of the functions of the desktop client, but at least it is a mechanism that I can script! This should be do-able. Thanks!
Israel Lopez
Thanks for reminding me to use the XML/SDK provided. I was able to build a test framework proof of concept, and now im working on developing an easy to use tool package!
Israel Lopez
Awesome--glad I could help.
Bill K