WHAT'S KEEPING YOUR APP FROM FALLING APART?
Testing Early and Often Can Help Prevent Web Applications From Crumbling Under Pressure Like a House of Cards
Written by: Ernst Ambichl
Provided by: Software Test and Performance Magazine - Volume 5, Issue 3, March 2008
Many organizations wait until the end stages of application development to perform load testing. This practice often leads to the discovery that the architecture doesn't scale well, at a time when it's too late to do anything about it.
The earlier you start load testing during the application life cycle, the earlier the underlying infrastructure's software defects, design flaws and bottlenecks will be found. A methodology that establishes quality and performance-related activities early in the application life cycle helps to mitigate the risk of project failure, reduces overall project costs, and increases the application's quality and performance.
Despite the well-known fact that the cost of issue correction increases in each downstream phase, project teams often wait until the end of development to set up and integrate load testing. While it's good practice to perform end-to-end load tests on an application shortly before going live with a new or updated product to prove that the application performs and scales as expected, if the results don't meet the expectations, you can't do much to salvage the project at such a late stage.
Usually these activities are limited to tuning the hardware or software configurations, and often, as a last resort, throwing more or faster hardware at the problem. If neither of these activities is successful, it's back to development to find the root cause of the problem in the application code. In the worst-case scenario, the core architecture isn't suited for scalability and performance, and you have to redo core parts of the application.
With the emergence of application technologies such as SQA and the Web, you also need to adapt your load testing process to the new requirements and challenges that new technologies bring.
What to Test Early
Decisions about infrastructure and application architecture are usually done early in the application life cycle. Both have a strong impact on application design, implementation and operation. Reverting infrastructure and architectural decisions until late in the development process can be painful. If you want to prove your architectural concept or different architectural alternatives, you often start with a prototype that implements your major concepts. By applying the prototype to the planned hardware/software infrastructure early, you can test how well the chosen architecture is suited to the infrastructure it will run on.
Component load testing can be done against business logic components as soon as they're ready, and without the need of a fully developed UI or other software components. With SOA-component load testing, early load testing becomes even more critical.
The earlier you start developing load tests for components of your system, the earlier you can start to find regressions of performance when these components change. By integrating load tests as part of your regression test suite, you can avoid detecting performance problems long after they are introduced.
Focus on Infrastructure and Architecture
Some could argue that testing with a focus on infrastructure is a classic bench-marking domain and doesn't have much to do with load testing an application. Basic hardware/software infrastructures such as network switches, Web servers, firewalls, application servers, DBMSs or messaging middleware are already well known and mature. Often you can even find standard benchmarks for most parts of your infrastructure. But be careful: Standard benchmarks have down sides, as they:
- Ignore your application's individual structure and workload
- Exist only for discrete infrastructure parts, not for the specific combination of infrastructure parts that make up your application infrastructure
- Usually aren't available for new application technologies
The benefits of early load tests of parts of the application within the target infrastructure are:
- Early capacity assessment of the application infrastructure
- Early check for scalability of your architecture
- Early identification of relevant performance indicators and configuration settings
- Early information for infrastructure tuning
By load testing the infrastructure early, you're able to learn about the configuration settings and metrics that are relevant to performance. Knowledge of the relevant performance indicators and configuration settings is highly valuable, not only for later testing and tuning, but also for setting up the right set of infrastructure monitors for your live application.
For this kind of test, especially within large IT organizations, two or more groups often need to cooperate. The first is IT operations, which is responsible for the infrastructure the application will run on in production. The second is the development team, which is responsible for the application and the scalability of the architecture. A dedicated performance team (perhaps part of the QA group, development or IT) can greatly facilitate these efforts and act as the bridging group between development and IT.
For Load Testing certain types of prototypes and types of load testing, please read further in the Software Test & Performance magazine.