Performance Testing

The last thing we feel we should mention in this appendix is performance testing. We waited to cover it until the last section intentionally. Performance is an important aspect of the application, but it is far more important to have a stable and robust application. Users will be much happier to get a slower but working application rather than a fast application that is unreliable and buggy.

However, if at all possible, it is useful to run a performance test before you release the application using a multi-processor machine. This may reveal concurrent programming problems (deadlocks and race conditions), which would otherwise go unnoticed.

We use JMeter for our web performance testing. You can download the latest version of JMeter from JMeter allows you to test the raw throughput of your application as well as its robustness and memory usage under extreme stress. You can start hundreds of user sessions and make as many requests per second as your machine can handle. The result of JMeter testing is shown in Figure A-2.

image from book
Figure A-2: JMeter testing results

As you can see, we managed to squeeze out about 37 requests per second on a single Pentium IV 2GHz machine with 1GB of RAM and a JBoss 3.2.6 application server.

It is very useful to combine performance testing with memory profiling. One of our favorite memory profiling applications is JProbe, which is now available for free download at Even though memory profiling is not directly related to testing, it helps you identify situations where objects are not garbage collected because you have forgotten to free a reference to them. This is usually the case with forgotten attributes in the HttpSession; these can slowly kill a web application with an OutOfMemoryError.

Pro Spring
Pro Spring
ISBN: 1590594614
EAN: 2147483647
Year: 2006
Pages: 189

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: