Java Performance and Load Testing: Best PracticesBy Dipankar Das, Gaea News Network
Saturday, November 14, 2009
The performance test for J2EE application is a difficult task unless you plan well earlier. During development, you need to gather user requirements, understand the business need and make a formal schedule for testing. The performance test is supposed to be based on some use cases. This can be based on past data or anticipated data from future usage. Once you know what needs to be tested , the next approach is how you are going to test it. I prefer benchmark test in the early stage of development to figure out any repeatable performance regression. The best way to conduct benchmark test is to change one parameter between tests. You can gather critical information of repeatable result through benchmark test. Suppose, your application is impacted when you change the JVM memory setting. You increase the memory in different stages of the test. Then you study the result and corresponding data and record the information.
During the development cycle, after you fix the bugs, you can plan for next step of testing to figure out how the application changes with different load pattern. Load testing is a crucial part during development cycle. It helps you understand how your software scales and helps you investigate which components or tiers in your application need tuning or figure out any performance bottlenecks; it also helps you get more information from every processor on which your application runs. There are two type of Load Test ie. 1> Stress Test and 2> Real world Simulation. Stress test emphasizes on the actual simulation of the users who interact with the application without any delay. The main idea of this test is to find the performance bottleneck and to figure out the amount of load the hardware and software can take. The purpose of the real world simulation is to find out the maximum number of concurrent users who can use the system.
The performance test is conducted by the manager based on the following tips:
- Allocate budget for the performance management
- Make an internal performance report
- Set the performance requirement in the specs
- Include a performance focus in the analysis.
- Require performance predictions from the design.
- Create a performance test environment.
- Test a simulation system for validation.
- Performance test the system with different scales and tune with the final information
- Deploy the system with performance logging features.
Tags: J2EE, JVM, Load test, Performance Test, System Validation, Tuning