Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

White Box – MCDC Testing

Last modified on January 7th, 2019 at 9:02 am

White Box – MCDC Testing

MCDC enhances the condition/decision coverage criteria.

According to MCDC  each condition independently affects the outcome of the decision.

For example, this example contains three conditions

if(a<10     &&     b<20    OR   c<30)

{
}

 

Condition C1: a<10

Condition C2: b<20

Condition C3: c<30

According to MCDC in this example,

  • Firstly, we will see that overall decision(T or F) depends on Condition C1.
    • If C1 is T, then a decision will be T
    • If C1 is F, then a decision will be F.
  • Secondly, we will see that overall decision(T or F) depends on Condition C2.
    • If C2 is T, then the decision will be T
    • If C2 is F, then the decision will be F.
  • Thirdly, we will see that overall decision(T or F) depends on Condition C3.
    • If C1 is T, then the decision will be T
    • If C1 is F, then the decision will be F.

Test Requirements:

No of test requirements = No of conditions * 2

Note: Here 2 representing T and F.

If 1 condition:

No of test requirements = No of conditions * 2.

2 =1*2

If 2 conditions:

No of test requirements = No of conditions * 2

4 =2*2

If 3 conditions:

No of test requirements = No of conditions * 2

6 =3*2

 

Test cases:

Decision depends on Condition  C1.

abCC1C2C3DescisionTest Case#
51040TTFT1
151040FTFF2

 

Decision depends on condition C2.

abCC1C2C3DescisionTest Case#
51040TTFT3
54050TFFF4

 

Decision depends on condition C3.

abCC1C2C3DescisionTest Case#
154010FFTT5
154050FFFF6

.

Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.