TrainingConferencesAbout UsContact UsAdvertiseSQE.com

StickyMinds.com: brain food for building better software

Join

Join

Clarify Your Search Criteria
Tips on Using Our Search Feature(s)
StickyMinds.com Home
ResourcesEventsTopicsPowerPassJobs
Software Testing & QA Online Community  >  Detail: Exploratory Load Testing


A StickyMinds.com Original
Article Picture
Exploratory Load Testing

By Danny R. Faught

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: Load testing is a necessary but daunting task on many testers' to-do lists. As difficult as the task may be, it helps testers find problems when a software product is running at full capacity. Danny R. Faught explains how he takes an exploratory approach to load testing, which gives quick results without making a big tool investment.


Tricentis
Load testing often involves a complex tool with a steep learning curve, possibly costing many thousands of dollars and a big investment in hardware to drive the load. I have learned how to sidestep these complications--at least at the beginning of a load testing effort.

I like to call my approach "exploratory load testing." Most of what is written about exploratory testing is in the realm of simple functional testing, but the same concepts can apply to load testing. To round it out, I throw in agile automation practices. You can do exploratory load testing using one of the full-featured commercial or open source load test tools, but I find that I'm more effective when crafting tests in a general-purpose scripting language using the available open source programming libraries. And that's the approach that I'll discuss here.

Exploratory load testing is most useful when the organization has not put much thought into the performance requirements of the system and hasn't developed a statistical usage profile. I'm usually asked to find the limits of the software, and then management decides which limits need to be raised. Often, in my experience, the exploratory load tests are all the load testing the project needs, but you may find that you need to employ a more sophisticated performance and load test after the product matures.

Dipping Your Toe in the Water
You'll need to do some programming in order to do load testing well. If you're not yet a programmer, take heart, because you can build your skills incrementally. On one project, I needed to load test an application that does peer-to-peer networking. The simplest thing I could start with was to get as many of my old junker computers as possible up and running, and manually run one instance of the application on each of them. Four or five computers running the application were enough to shake out some basic functional problems that would be showstoppers for a more elaborate load test.

As the application became more reliable, I needed to run more instances of it. I asked the development team to add features that would allow me to run more than one instance of the application on one computer. Management supported this effort, because the alternative would be to buy scores of additional computers. I was able to run between five and thirty copies of the application on each of my test machines, depending on the hardware resources on the machine, with a total of up to a hundred copies running in my test lab. Simply starting the applications and checking to see if they all saw each other on the network was a sufficient test for finding several load-related bugs.

It didn't take long before the tedium of manually starting the applications prompted me to start writing a tool to take over the task. I wrote a short bash shell script that launched a specified number of instances of the application on a machine, and another one that shut down all of them. I could then issue one command on each of the test machines to kick off the load test.

Building a Web Robot
On another project, I needed to conduct a load test for a Web application within a short time frame. After learning the basics of how the Web site worked, I had about half a day to build and run a load test to give a preliminary assessment of how reliable the application was. This time I used Perl and the WWW::Mechanize library to simulate a Web browser. I paired with another tester who had experience using commercial load test tools but who wasn't familiar with Perl. It took forty-two lines of code to log in a user and click a link and iterate as many times as we desired. We only had three test accounts available, but once we proved that a user could log in from more than one browser at a time, we programmed the script to repeatedly log in the same few users.

At first I "drove," writing the preliminary version of the script and showing my partner how I used the automation library. When we found that we could log in thousands of sessions at a time without error, my partner took over the keyboard. We added code to randomly choose sessions that had already logged in and had them click another link to keep the session from timing out.

This was probably my first project where the first simplistic approach to load testing did not find any serious limitations in the product. With further exploratory functional testing, we did find numerous robustness problems, such as unexpected form input causing server exceptions. So after a few days of testing, we were able to report that robustness problems were more of a concern than the reliability of the system under load. We still needed to follow up with a more elaborate load testing approach before we could confidently say we had found most of the major reliability issues. Continuing the incremental approach to load testing would ensure that the project gets timely feedback on reliability, so that management can easily decide whether to invest in additional load testing.

Organic Script Gardening
In the Web testing example above, the script was contained in a single file. After a few hours of development, we started to abstract some common actions into subroutines. This was sufficient for what we needed for the short project.

For the peer-to-peer application discussed above, I was involved in the testing for several months and developed a whole suite of test tools for it. The application uses several different network protocols. When I started experimenting with testing a new protocol, my test code would be contained within a single script. As the script became more sophisticated, I would extract code into subroutines and eventually move the subroutines in an object-oriented test library. The code grew organically, and I carefully tended the developing garden of code so it didn't grow wild and unmanageable. I now have a powerful and continually growing arsenal of application-specific libraries that help me to quickly craft variations on the load tests I've done before.

The good news for you is that you can start to build load tests using an incremental approach. Adjust your approaches as you learn more about how the system reacts. Once you find one bug, you can often tune your test to avoid that bug. This way, you can find additional problems without waiting for a bug fix. Choose whichever tool will get you started fastest, whether it's a full-featured load test tool or a scripting language with a collection of existing libraries.

References
"What Is Exploratory Testing?"
"Not Your Father’s Test Automation: An Agile Approach to Test Automation"
"Screen-scraping with WWW::Mechanize"

About the Author
Danny R. Faught is the proprietor of Tejas Software Consulting. He is developing a service to support the efforts of experienced toolsmiths and to help them learn from each other. Contact Danny at faught@tejasconsulting.com or see http://tejasconsulting.com for more information.

Back to Top
 
 


Member Comments
Add Your CommentCollapse Comments
 
Comment:    
by Muralidhar Rayapeddi 2/14/2006

This article started off with a description that, "Exploratory testing helps testers find problems when a software product is running at full capacity" and how "exploratory approach to load testing gives quick results without making a big tool investment". I could not gather from the article how a big tool investment can be avoided. I think exploratory approach only describes how best we can test a software product and not necassirly on how exploratory testing avoids build a tool to test the software product. I work in a telecommunication domain where we do performance testing of our product to make sure, the product handles the high call load. For performance testing one such component in the product we have to make sure all the supporting components are also available to test that capacity. In such scenarios we build tools to test a software product individually. I dont think this can be avoided and I dont think exploratory testing avoids in making such big tool investment. Please advise....Collapse Comments

Author's Response:
2/14/2006    
I'm combining three techniques here - load testing, exploratory testing and agile test automation. Agile test automation allows a tester to take an incremental approach to building up a set of tools, which gives the exploratory tester the quick turnaround on results that is needed. On some projects, especially in telecom, you'll eventually need to have a complex load test and a big tool investment, whether you use commercial, open source, or home grown tools. But even on these projects, using an incremental approach to tooling may give you load test results earlier in the project if you don't wait to build or acquire the full toolset before you start load testing. Feel free to email me if you'd like to discuss this further.

 
 
Comment:    
by kalyan rao 1/18/2006

I was expecting to see how to use open source test tools to perform load/stress/performance testing engagements. Are they now mature enough to give a tough fight to commercial test tools. Any way, good article.

Author's Response:
2/14/2006    
There are several full-featured open source load test tools like OpenSTA that are getting good press lately. They tend to be incompletely documented and bug-prone, but some commercial tools have the same problem. What I prefer using is programming libraries instead, so my test is controlled by a script rather than a controller with a graphical interface. I often pull together several readily available Perl libraries in order to build a simple load test script.

 
 
Comment:    
by Meredith Courtney 1/13/2006

For many years I've been testing voicemail products for telcos and large cellular operators, and that's a pretty structured environment - and a lot of the load testing has always been exploratory. Start with "aim a lightweight basic scenario at it" (as early in the release cycle as possible), and watch it for a while, and then adjust to push on anything that looks a bit dubious. You really can't plan out that sort of thing in advance, because you don't know what's going to look odd (system in Load Limiting at 10K calls/hour? Log messages indicating Resets when there shouldn't be any?). Elaborate predefined scenarios have their place, especially when you have specs claiming that your system as delivered to Customer X will support a peak load with specified average characteristics at <large number> calls per hour, but there's no substitute for time and resources to go looking for trouble....Collapse Comments

Author's Response:
1/13/2006    
Thanks for the report, Meredith. It's especially useful to hear about exploratory load testing in telecom, which is a traditional domain for formal reliability testing.

 
 
Comment:    
by John Daughety 1/11/2006

I think there are two points you make in this article that are very important for us, regardless of the type of projects we support: 1) exploratory testing actually lends itself well to load testing, where I have seen people pick a safe "middle of the road" test case and run it with a bunch of virtual users to see if the server smokes. This is a good starting point, but using an exploratory tester's mindset to add tests where the fault density is likely higher under load can find the big, ugly, major design changes that are so painful. Focusing on statistics generated by LoadRunner's test using 10,000 virtual users over a 24 hour period will generate a ton of metrics but may miss critical problems. 2) Your comment about how you are asked to load test is very telling - someone in an organization says "make sure this thing won't break when a bunch of people are using it". Actually, I may have given that person too much credit for a detailed requirement! This kind of statement from a customer or a boss is a very big, very red flag, and the best approach is to set realistic expectations (which will be low) and deliver results iteratively. In my experience, discussion of the results of each iteration will yield additional requirements as well. This is great advice for the many of us either consulting for or employed by less formal development shops who may not understand the implications of load testing....Collapse Comments

Author's Response:
1/11/2006    
Good point, John. I agree that a performance test using a single operational profile and a fancy tool may not find as many bugs as an exploratory approach would. My first exploratory load test is the simplest test I can possibly automate. If the software responds well to that test, then I make it incrementally more complex, covering more of the software's functionality. Maybe some day I'll figure out how to convince an executive to set solid performance goals before testing starts. But when we get such rapid feedback from exploratory testing, I'm not sure that it's critical to have a (possibly arbitrary) goal in place before testing starts.

 
 
Comment:    
by Scott Barber 1/11/2006

Bravo Danny! It warms my heart to see more people realizing that Performance/Load/Stress Testing is Exploratory by nature and that significant value can be added early in the project using "whatever tools you have around the house". In the March issue (I believe) of Better Software, I have an article that describes a method for planning and tracking this kind of early life-cycle, exploratory performance testing that is intended to be light, flexible yet capture the information that folks are most likely to want to reference later. I'd love to hear your thoughts on it when it comes out. Anyway, once again, great article on an important topic!...Collapse Comments

Author's Response:
1/11/2006    
Thanks for the feedback, Scott. I'll watch for that article.

 
 
Comment:    
by Babu Narayanan 1/9/2006

Even though the topic looks interesting, there is serious doubt in making this concept practical. Exploratory and load testing may not work better as: 1) the requirements for the load testing needs to be clear (much more than functional testing). 2) the scope is not as wide as functional testing. I would love to see the contribution of open-source scripts/tools in the load test automation. Unfortunately with known limitations (like protocol support, vuser size), OPEN-SOURCE could not succed (except 'The Grinder')in this market.

Author's Response:
1/9/2006    
Hi. Maybe the environment you work in is more structured than the ones I usually work in. I often work in projects have not set any performance goals, and when I report what the actual performance is, they have some concrete information to make decisions about. I dont quite understand your second comment (feel free to email me). Im guessing that youve tried some of the more complex open source load testing tools. I havent had much success with them myself, including The Grinder. Im much happier coding my tests using Perl, which has libraries that support an amazing variety of network protocols, and the tests have such a low overhead that I can get a lot of testing done before hitting resource limits.

 
Back to Top



 
Ads By Google
What's This?
 
 



About Us   |   Contact Us   |   Terms & Conditions   |   Privacy Policy   |   RSS Feed



© 2013 StickyMinds.com. All rights reserved.
PNSQC

Tricentis



STARWEST