Monday, March 1, 2021

Test Case Design Techniques

 In this blog, I am writing about Test Case Design Techniques which is very important topic for every Tester.

What is Test Case Design Technique?

It is the technique which is applied while writing test cases in order to improve text case coverage.

Types of Test Case Design Techniques:

1.      Error Guessing

2.      Equivalence Partitioning/ Equivalence Class Partitioning

3.      Boundary Value Analysis (BVA)

4.      Decision Table Technique

5.      State Transition Diagram/ Technique

Now we shall see each Test Case Design Technique.

1. Error Guessing:

1    In this technique, we will try to guess the errors and derive more scenarios. Error Guessing depends on the analytical thinking of every tester. Here, we test only negative input or invalid values and try to guess the error message in the application.

Example: Amount Text field -It should accept only positive integers

Invalid / negative inputs             Error Message

156.45                                  -      Decimal Values are not allowed

Hundred                               -        Only alphabets are not allowed

2. Equivalence Partitioning:

2.      In this technique, we have two types:

1.      Pressman rule

2.      Practice Method

1.Pressman rule:

Rule 1: If the input is range of values, then design test cases for one valid, two invalid values.

Example: Amount Text field – as per requirement range should be 100-5000

Test Case: valid-2000, invalid -90,6000

Rule 2: If the input is set of values, then design test case for one valid and two invalid values.

Example: Search Text Field – Product ID list has 27, 51, 68 as ids.

Test Case: valid 51, invalid 23, 69

Rule 3: If the input is Boolean, then design test cases for both true & false values.

Example: If there are radio buttons for male and female, then both the radio buttons should be tested. 

3.      Practice Method:

If the input is of range of values, then divide the range of values into Equivalent parts & test for all the values & also make sure that we are testing for at least two invalid values.

Example: Requirement for Amount Text field : 100 to 5000

Test case: valid -100,1000,2000,3000,4000,5000

                   Invalid-90,6000

If there is a deviation between range of values then we go for Practice method. If there is no deviation between range of values, then we go for Pressman rule. By looking into the requirement, we will get to know whether there is deviation in between the range of values or not.

3. Boundary Value Analysis (BVA):

    If the input is range of values between A to B then design Testcases for A, A+1, A-1 and B, B+1, B-1.

     Example: Requirement for Amount Text field: 100 to 5000

     Test Case:  + ve: 100,101,4999,5000

                         -ve: 99,5001

    We go for this technique because chances are more that developers make mistake while writing code for Condition operators. So, chances of finding defects will be more near the boundaries that is the reason we need to always write Test Cases by applying BVA rule.

4. Decision Table Technique:

    In this technique, we check for multiple conditions, combinations & rule criterias.

    Formula:  2no of conditions   =rule criterias/scenarios

Example: A person is applying for credit card and there is discount on purchase along with coupon code.

Requirement: If the person is new customer and opening credit card account, then bank will give 15 % of discount on the purchase. If the person is old customer and having loyalty card then bank will give 10 % discount on the purchase. If he is having coupon code , then he will 20 % discount.

Condition: Coupon code cannot be used together with new customer discount, if he is using also then highest discount will be considered.

There are totally 3 conditions: 1. New Customer discount

                                                 2.Old Customer discount

                                                 3. Coupon code Discount

 Then 23 = 8 rules/scenarios.

No of conditions

Rule 1

Rule 2

Rule 3

Rule 4

Rule 5

Rule 6

Rule 7

Rule 8

New customer discount(15 %)

T

T

T

T

F

F

F

F

Old Customer discount(10 %)

T

T

F

F

T

T

F

F

Coupon code discount(20%)

T

F

T

F

T

F

T

F

Overall discount %

No

No

20%

15 %

30 %

10%

20 %

No

 Based on the table above, we write scenarios for the conditions.

5. State Transition Diagram / State Flow Diagram

In this technique, we will check for different states on screens or pages of the machine or system or software is properly displayed or not.

Example : ATM Cash Withdrawl Flow

In the above flow diagram, each flow for the cash withdrawl is drawn so that test scenarios can be easily created.

Hope you liked my blog!!!!

Thanks for reading!!!!!!!!!!


3 comments:

  1. Thank you, so much information I’ve been waiting for your next blog.
    Additional hints

    ReplyDelete
  2. Will blog comment backlink increase my referral
    read this

    ReplyDelete
  3. Your blog is very nice and we hope you are
    Providing more information in future.see here now

    ReplyDelete