All IT Courses 50% Off
QA Tutorials

Decision Coverage Testing and Decision Table Testing

Decision coverage or branch coverage may be a kind of testing methodology which aims to makes sure that every condition among the possible branch from each decision point is executed. Every decision is taken each way true or false. It helps in validating all branches in the code making sure that no branch leads to abnormal behaviour of the application.

Read A
Read B 

IF (A+B) > 10 THEN 
  Print "A+B is Large" 

If A > 5 THEN 
  Print "A Large"

To calculate Branch Coverage, one has to determine the minimum number of paths which can make sure that all the sides are covered. In this case there is no single path which will make sure coverage of all the edges at once. The main aim is to cover all possible true/false decisions.

Decision coverage technique is one of the white box testing technique which gives the decision coverage to Boolean values. This technique reports both the outcomes either true or false of the Boolean expressions. Whenever there is a possibility of two or more outcomes from the statements like do while statement, if statement and case statement, it is considered as decision point because we have two outcomes true or false.

Decision coverage provides all the possible outcomes of each and every Boolean condition of the code by using the control flow graph or chart. We have a decision point which has two decision values one is true and another is false that’s why most of the times the total number of outcomes is two. The percent of decision coverage can be found by dividing the number of exercised outcome with total number of outcomes and multiplied by 100.

Decision Coverage technique in whitebox testing link

In this technique, it is tough to get 100% coverage because expressions get complicated. Due to this, there are several different methods to report decision coverage. All these methods cover the foremost important combinations and really much almost like decision coverage. The advantage of these methods is enhancement of the sensitivity of control flow.

What is decision table in software in software testing?

A decision table is a good way to proceed with combinations of things. This technique is sometimes also referred to as a ‘cause effect’ table. The reason for this is that there is an associated logic diagramming technique which is also called as ‘cause effect graphing’ which was sometimes used as to help derive decision table. 

How to use decision table for test designing?

Consider a example of an loan application where you can enter the amount of the monthly repayment or the number of years you want to take to pay it back. If you enter both, the system will make a compromise between the two if they conflict. Two conditions are loan amount and term of loan.

Conditions                      Rule 1                 Rule 2                Rule 3               Rule 4

Repayment amount has
been entered:

Term of loan has been

This is called empty decision table.

Next we will identify all the combinations of true or false, with both conditions each of which can be true or false. We can have four combinations. It is always good to tackle small sets of combinations at a time. In order to stay track of which combinations we’ve we’ll have alternate true or false on rock bottom row, put two trues  then falser on the row above the bottom row.

Conditions                         Rule 1               Rule 2                  Rule 3                Rule 4

Repayment amount has          T                        T                         F                         F
been entered:

Term of loan has been             T                        F                        T                          F

Decision table with two input combinations.

Facebook Comments

One Comment

  1. Decision coverage testing is one of the white box testing technique which gives decision change to boolean values. It reports both the outcomes either true or false. Whenever there is possibility of 2 or more outcomes, it is considered as decision point. It helps in validating all the branches in the code and makes sure no branch leads to abnormal behaviour of the application.
    Decision Table Testing is a Black Box test design technique (behavior-based technique), used where different combinations of test input conditions result in different outcomes. When a system has complex business rules, then the decision table testing technique helps in identifying the correct test cases.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles

Back to top button

Get Python Course
worth 499$ for FREE!

Offer valid for 1st 20 seats only, Hurry up!!

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

H2kinfosys Blog will use the information you provide on this form to be in touch with you and to provide updates and marketing.