Testing Lessons from Kitchen!

John asks: "What is the difference between static testing and dynamic testing?"

Rama asks: "What is the difference between verification and validation and how are they related with software testing?"

Vikash asks: "In Software Development Life Cycle (SDLC), what is V&V (Verification and Validation)? Are they same? If not, how do they differ?"

These are few testing FAQs that came to my mind before I could start writing this very post – Testing Lessons from Kitchen! I am frequently asked questions similar to the above by some of my readers through email/chat/Orkut scrap. Also I have seen such questions flooding the testing forums/communities. So I thought, it was time to write a post about it. But I wanted to explain the answer in a non-traditional way so that it could be easily understood. Hence, I was looking for an easy to understand example and luckily I got the clue from my own kitchen!

My
younger brother [who is a BE (EEE) 3rd year student in a reputed Engineering College in Chennai] is trying to learn cooking now-a-days! Isn’t it a funny thing? Well, the reason behind his newly found passion for cooking is still funnier! He actually wants to beat me in cooking! LOL
[Note - My friends say that I am a great cook. However, to *validate* this claim, one day you have to come and taste (test!) my food. :)]

Coming back to my story, yesterday I was watching my brother preparing egg omelette. And suddenly, I got the idea for this post. Have you ever prepared egg omelette? If you have ever prepared, then you might already know that you need ingredients like eggs, cooking oil, onion, salt, spices, green coriander leaves, finely chopped green chillies etc to prepare an omelette. [I am talking about Indian egg omelette here.] However, this list of ingredients is not exhaustive! I might have missed few ingredients; but still with these, one can prepare a delicious enough egg omelette. Apart from the ingredients, we would need a frying pan, a spatula, a gas stove, a matchbox, a kitchen knife etc. as support items for our “project egg omelette”!

Now the question is “Assuming that you already know how to prepare an omelette, can you prepare an omelette, if I provide you with the above stuffs”? Oh wait did you say YES? Well, I would urge you to think again. What if I provide you with a dozen of eggs, a teaspoon of oil, a small onion, 1-kilo salt, unlimited supply of spices and so on. And I ask you to prepare a 12-egg omelette for me using the above ingredients. Will you still say YES? I guess not! The ingredients that I have provided you are terribly disproportionate. A teaspoon of oil might be sufficient for an omelette of 2-3 eggs, but clearly not for a dozen of eggs. The other ingredients are also obviously out of proportion. So it is quite unfair to ask someone to prepare me a 12-egg omelette with the supplied ingredients.

Lesson 1: *Verify* whether your ingredients are in correct amount/quantity.

Now if I provide you with the ingredients in correct quantity, can you prepare me a nice 12-egg omelette? Well, don’t say YES so quickly without giving it a second thought. What if I provide you with oil that is stinking and a dozen of rotten eggs? Will you be still able to prepare nice omelette out of it?

Lesson 2: *Verify* whether your ingredients are of good enough quality.

Now let me assume that, you have got all the ingredients in appropriate quantity and expected quality and you have finally prepared the long awaited 12-egg omelette. But would you not care to taste (test!) a piece from it before serving it to your honourable guest? Just to see if it is actually delicious. To see if any of the ingredients was overused (e.g. too oily, too spicy ...). To see if any of the ingredients was used in less quantity than it should have been (e.g. less salt, hard-to-find onion pieces ...). To see if it has been fried just enough and is not raw inside. To see if it is not burnt while cooking...

Lesson 3: *Validate* whether your final product (here the omelette) has been prepared correctly.

Now let us see how the preparation of an omelette makes sense to software development verification and validation process. The verification of the correct quantity and correct quality of the ingredients, while preparing the omelette (Lesson 1 & 2) can be compared with the verification process in software development. The final validation of whether the omelette has actually been prepared as expected (Lesson 3) can be compared with the validation process in software development. Verification was done when the omelette preparation was underway! But we did not have any actual omelette while doing the verification process. Validation was done once we thought that we had prepared the omelette. So we needed a final product (here the omelette) for validation.

These are few ways in which people like to define verification and validation process:

Am I building the product right? – Verification
Am I building the right product? – Validation
-Anonymous


Verification ensures that the final product satisfies or matches the original design (low-level checking) - i.e., you built the product right. This is done through static testing.

Validation checks that the product design satisfies or fits the intended usage (high-level checking) - i.e., you built the right product. This is done through dynamic testing and other forms of review.
-
Wikipedia

Static Testing is a form of software testing where the software isn't actually used. Code reviews, inspections and walkthroughs are used as approaches of Static Testing. From the black box testing point of view, static testing involves review of requirements or specifications. This is done with an eye toward completeness or appropriateness for the task at hand. Defects discovered at this stage of development are less expensive to fix than later in the development cycle. Here we do the verification part.

In contrast, in Dynamic Testing the software must actually be compiled and run. So it is done after an executable portion of the project is ready to run. Actual testing (unit testing, integration testing, system testing and acceptance testing) of the product comes under dynamic testing. Here we do the validation part.

Hope this comparison helps in understanding the difference between verification and validation in a better way. Feel free to comment on this by leaving behind your comment. If you have got some other interesting example to explain it, do share with me (and others) by a comment.

Happy Testing...

Similar Posts:
1. Test Automation Traps! – A tool with a fool is still a tool!
2. How to get started in Software Testing?

Share on Google Plus

About Debasis Pradhan

Debasis has over a decade worth of exclusive experience in the field of Software Quality Assurance, Software Development and Testing. He writes here to share some of his interesting experiences with fellow testers.

7 Comments:

  1. Hi Debasis,

    The explanation about the difference between Validation and Verification was really helpful. It not only made the concepts clear for me but for my entire team. The entire team enjoyed this blog.

    Great going.

    -Ajay

    ReplyDelete
  2. @ Ajay & Team,

    I am glad that this explanation was helpful for you. I hope I will continue to serve similar contents, which might be interesting to you. So keep coming back. [Here I am assuming that you have already subscribed to this blog.] I would highly appreciate if all of you try to share your views and experiences (by commenting). That way, we can use this blog as a platform (forum!) for testing related discussion. I am waiting to hear more from you soon. Thanks.

    Regards,
    -Debasis.

    ReplyDelete
  3. Hi Debasis,
    I have come across so many explanations for those terms,but no one has made me more understandble.Excellent example...
    Keep going on....

    ReplyDelete
  4. Hello Debasis,

    This is JakeBrake. I enjoyed your V&V analogue. It is a great explanation of an often confusing topic. I also love omelettes.

    ReplyDelete
  5. @ Radha & JakeBrake,

    Thanks for those kind words of appreciation. Keep visiting the blog for more such posts in future.

    P.S. - I love omelettes too ;)

    Happy Testing ...

    Regards,
    -Debasis

    ReplyDelete
  6. Hi Debasis,
    The explaination of Verification and validation is really very helfull.

    So simple expalaination.

    Thanks

    ReplyDelete
  7. HI debasis,

    I am a new guy who read your blogs today on Smoke Testing VS Sanity Testing and V&V. I really helped me a lot. Your blogs on these topics are very near to real life example. Till today i am searching for a person who explains the testing concepts with a real life scenario. Today i felt that i have reached one goal by finding you such a marvelous guy. Please keep on posting the following concepts also

    1. Differences between Quality Assurance and Quality Control

    2. Basis Path Testing

    3.How to prepare a Test plan

    with real life examples.

    Thanks & Regards
    Tulsi
    chennai.tester@yahoo.com

    ReplyDelete

NOTE: Comments posted on Software Testing Tricks are moderated and will be approved only if they are on-topic. Please avoid comments with spammy URLs. Having trouble leaving comments? Contact Me!