Thursday, July 06, 2006

Learning testing through analogies

Hi Reader,

Learning something new is always a challenge and learning testing is like challenge of challenge. When I started learning testing, I found it challenging not only because that learning testing was a challenge but every individual had their own opinion of testing, its methodologies, its branches, its definitions, its vocabulary, its guru's.

"How do I learn testing or from whom do I learn testing and how do I know who is right?" .. were the questions running in my mind.

It was indeed a tough phase of life for me. I happened to be misguided by all the people whom I ask "What is ..... in testing?".

One such basic question I asked was "What is regression testing?" and the answers that confused me are "It is execution of all test cases" , "It is a selective re-testing" , "It is the cycle of testing where all cases should pass", "It is a product qualification test", "It is a combination of Sanity, Comprehensive and Extended set of test cases"... ( goes on )

Well I am lucky to have worked with many organizations in a short period of time. Why I term it "lucky" because, I got a chance to get more confused about what testing is all about. In some places they referred to me as a Quality Assurance personnel and in some other places I was referred to as Test Engineer. Of course, I did ask myself "Who am I?" because I did testing, irrespective of some organization calling me a QA guy or a Test Engineer.

Fed up with the confusions, getting inspired by James Bach, developing passion towards learning testing, I started to think on my own.... to find the answers.

3 years passed ....

Now let me take you to present tense ...

Recently a tester in India contacted me to know the difference between Load and Stress testing and this is how I explained ...

_ Learning testing through analogies __

Ok, so you would want to know the difference in Load and Stress testing and how can it be done, well let us start thinking then...

Assume you are asked to test a chair that can take a load of 50 kilos. For a chair Load and Stress tests are the most important ones as it will be subjected to either of these at usage.

Now let us take up a dictionary and find what the meaning of load is?
Word Web says "Weight to be borne or conveyed" is load.

Ok the next step as a tester is to think of use cases, test cases and test content.

Let us make it brief by starting off with the collection of test content, i.e 10 kilos * 5 bars, 1 kilo * 10 bars, 100 grams * 10 bars, 10 grams * 100 bars.....

Now start testing with a minimum load of say 10 kilos and gradually keep increasing the load in equal steps till 40 kilos. Once you have reached 40 start using 1 kilo bars up to 45 and then later till 49 use the 100 gram and as you near the required load bearing capacity add the weight in smaller steps.

Once the chair is loaded for 50 kilos, allow it for sometime and check for deformations if any on the chair legs.

If the chair takes 50 kilos comfortably then try adding more weight, again, in very smaller steps to see where it breaks. This does not mean you are breaking the system but to give a data that, a system expected to take 50 kilos load is designed to take more and hence the cost has increased.

OK, you are done with load testing and now let us shift our focus to stress testing.
Word Web says "force that produces strain on a physical body"

A very common question or confusion people have is "Is adding more load a stress test", the answer out of my research on this topic is "Need not be".

Well, I could use the same 50 kilos load to stress the system. How ?

There are different ways you can apply a load -

a) Axial Load - The whole load is concentrated on the axis of the chair. By applying a load to the chair in such a manner is a stress test. Use case - A person standing on the chair by putting his entire weight on the toe. People usually do this when they want to stretch for something which is still not rechable after using a chair to reach that ( book or something).

b) Truss - This kind of load becomes a stress where the the mass is not equally distributed over the chair. One leg of the chair could have to take more weight than the other and hence this too becomes a stress test. Use case - 2 children made to sit on the same chair. (Atleast, it happens in India)

c) .... (the only limitation is your imagination)

"Wow, I got a clear picture of Load and Stress testing and using this example, now I can think, how to load and stress test web application." was the reply I got from the person who asked me the question of load and stress testing.

Now, that is how I learn't some of the testing concepts, perhaps that is how I have been learning/teaching it and will continue to learn in the same way unless I see a better way.

_ Learning testing through analogies __

"To know what Stress Testing is say.. *Stress Testing Stress Testing ...* continously without gap..."


Pradeep Soundararajan
Tester Tested !


Joy Forever said...

A beautiful post. It surely helped to clear a lot of confusions for me, as I am a fresher newly into testing.

Tarik Sheth said...

This is a nice way to explain a concept.

raju said...

wow....great explanation !!!!

still u should use some practicle words like how to implement when we perform with web based application.....because we are new

salute to ur way of explanation....

Anonymous said...

no doubt.....excellent explanation.....

thank u dear

Pradeep Soundararajan said...

@ Raju,

Had I talked directly about web based application as you suggested, you would not have understood completely as you are new ( as per your own claims )

Moreover, I took practical example and not an impractical explanation.