23.03.2013 Views

Agile Performance Testing - Testing Experience

Agile Performance Testing - Testing Experience

Agile Performance Testing - Testing Experience

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Let me start with a simple, yet realistic example. I have a webbased<br />

application which allows a student to register for a course.<br />

Identifying a load test for this application is straightforward. Say<br />

I have 400 students on the rolls and a student, on the average registers<br />

up to 5 courses each semester. With a little investigation,<br />

I may identify a maximum load of 200 students simultaneously<br />

trying to register for a single course. I may also find that an average<br />

registration takes 10 minutes and the general trend is that<br />

students register for their courses in one shot. Hence peak loads<br />

may stretch up to 50 minutes. To briefly outline how I would test<br />

this scenario, my load test would invoke 200 students (randomly<br />

chosen from a data sheet listing 400 students and the courses<br />

they need to register for) and have them simultaneously register<br />

for their courses, one course after the other. I would run this<br />

test for an hour (expecting registrations to be complete by then).<br />

Amongst many parameters that I will be monitoring, I am particularly<br />

interested in transaction response time. This is a key parameter<br />

that translates to how much time end users wait for responses<br />

from the application during specified transactions. I will<br />

stick to this parameter for the purpose of my discussion, though<br />

it will apply to any parameter of interest. At the end of my test I<br />

generate a report that will display response time plotted for the<br />

duration of the test (see figure 1). I will be happy to see that the<br />

transaction response time has not significantly crossed 2000 milliseconds<br />

at any point. The result indicates that during peak activity<br />

and maximum load my application will not take more than 2<br />

seconds to respond. Assuming my acceptable response time limit<br />

is more, there is reason for cheering.<br />

Is Your Application’s <strong>Performance</strong><br />

Predictable?<br />

by Suri Chitti<br />

© Martinan - Fotolia.com<br />

Yet, there is more work to do. I have established acceptable performance<br />

under peak conditions. However, I have not established<br />

predictability. I now need to try and understand the range of<br />

loads my application will be subject to. Assuming I investigate<br />

and find that loads range between 25 to 200 simultaneous registrations,<br />

I wish to see response times beginning at 25 registrations<br />

and ending at 225 with stepped increases of 25 at every six<br />

minute intervals in my run. In my result, I wish to see a responsive<br />

trend in transaction response time with load, similar to the green<br />

graph in figure 2. The joyful aspect with a responsive trend is that<br />

there is a linear correlation between load and response time in<br />

my operational load range. The correlation is a strong indicator<br />

of predictability. I will be unhappy if I cannot see the correlation,<br />

or even worse, if I see an erratic (red graph in figure 2) trend in<br />

response time with load.<br />

If my application architect uses a web engine that can take loads<br />

very much above the range I have identified, I may notice a flat<br />

trend (purple graph in figure2) indicating there is no significant<br />

increase in response time with load in my range. However, my<br />

architect is, for performance purposes, using an elephant gun for<br />

bird hunting, and that will have its own problems, least of which<br />

is the money wasted on needless performance characteristics.<br />

An application that shows a good correlation between transaction<br />

response time and load in the operational load range during<br />

testing is likely to also be predictable during operation. On<br />

the other hand, applications that erratically respond to load, or<br />

have patches of unpredictabilty in their operational load range,<br />

are also likely to have unpredictable problems during operation.<br />

78 The Magazine for Professional Testers www.testingexperience.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!