Friday, March 26, 2010

Test Case Designing Techniques...... revisited

Hi Friends, I have been very busy lately so could not write anything but today I got some time so I thought lets utilize this time by writing some thing which I usually come across. I have been in Software Testing for long time so I thought this time lets share something technical related to my field i.e. Software Testing. Today I am taking up a topic which I feel every tester must be coming across every day but still are confused about it. In some interviews when I ask about this, most of the candiddates start confidently but then somewhere in between they mix up things. It is called “ Test Case Designing techniques”

For designing test cases there are multiple techniques but the most important and the basic ones are Equivalence Class Partitioning and Boundary Value Analysis. These 2 seems to be same but they are different in their definition and usage. Let us understand one by one

· Equivalence Class Partitioning: As the name suggest here we are partitioning test data in to classes. It is a technique by which we can reduce the number of test cases that has to be written but still having a reasonably good coverage. Here one test case will be written for each class. Let us understand with an example.

Consider a Student Admission application for a school which will accepts candidates with age within the range from 4 yrs to 18 yrs. Below 4 and above 18 don’t qualify for a school admission. Now to understand this situation from Equivalence Class Partitioning perspective there are following classes in this example
Class of data less than 4 yrs of age
Class of data between 4 and 18 yrs of age
Class of data above 18 yrs of age
Now out of these 3 classes one is valid and 2 invalid so any value from these classes can be picked up and that will hold good for all other values. So for instance, in this example test cases must be written for 3 values (2, 10, and 50) to test this scenario.

· Boundary Value Analysis: This technique works on the principle that highest number of defects lies in boundary areas. So we have to write 3 test cases for each boundary. Let us consider the same example as we used in for Equivalence Class Partitioning. In that example there are 2 boundaries, 4 and 18 so as per the technique we need to write 6 test cases for values, 3,4,5,17,18 and 19.

Usually we use both these techniques together so for the age field the values we need to test are 2, 3, 4, 5, 10, 17, 18, 19 and 50. You can also club these test cases but bare minimum these 9 values must be tested.

These techniques are very basic and must be used by all testers. Many of you must be already knowing about these techniques, may be even better than me but the whole thing is that whether we are using them or not and I am sure most of us are not using. Here I have tried to explain this topic to the best of my knowledge and I will encourage everybody whosoever will read it to comment if they agree or disagree so that we can have a discussion and develop better understanding about this topic which will help all of us.

1 comment:

  1. Hi Sir,

    I think we had discussion over it and that time also I was in your panel but it's good that you have documented that discussion in the form of blog.

    If you finally started writing on Testing then I need some information about UNIX TESTING. I would like to know that what basically testers do in UNIX TESTING. If you get any information regarding this, please transform in a blog post.

    Regards,
    Mayank

    ReplyDelete