![Page 1: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/1.jpg)
Condition Testing and Condition Coverage with
Prepare yourself for the ISTQB exam
![Page 2: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/2.jpg)
Dictionary
condition: A logical expression that can be evaluated as True or False, e.g. A>B. See also test condition. condition outcome: The evaluation of a condition to True or False. condition testing: A white box test design technique in which test cases are designed to execute condition outcomes. compound condition: Two or more single conditions joined by means of a logical operator (AND, OR or XOR), e.g. ‘A>B AND C>1000’.
condition coverage: The percentage of condition outcomes that have been exercised by a test suite. 100% condition coverage requires each single condition in every decision statement to be tested as True and False.
From „Standard glossary of terms used in Software Testing”
Copyright © 2013
![Page 3: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/3.jpg)
What is…?
Condition coverage, there are stronger levels of structural coverage beyond decision coverage, for example, condition coverage.
From „Certified Tester Foundation Level Syllabus (version 2011)”
Copyright © 2013
![Page 4: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/4.jpg)
Rules!
branch condition = condition branch condition coverage = condition coverage
From „Certified Tester Foundation Level Syllabus (version 2011)”
Copyright © 2013
![Page 5: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/5.jpg)
hiz = xs + pkl;
gff = sy - dr / nxa;
Copyright © 2013
Examples with sequential code
No condition to cover.
![Page 6: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/6.jpg)
IF (iuc && fow)
{
t = jcc + iky - hhs;
}
Copyright © 2013
Examples with IF
In order to cover all conditions, you need
2 test cases.
![Page 7: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/7.jpg)
IF (r && ha)
{
f = utx + g;
}
ELSE
{
mq = nxc * bff * cb;
}
Copyright © 2013
Examples with IF ELSE
In order to cover all conditions, you need
2 test cases.
![Page 8: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/8.jpg)
SWITCH (ck)
{
CASE 0:
jm = c - h;
break;
CASE 1:
si = pkb * t;
break;
CASE 2:
vh = ocd * fq;
break;
}
Copyright © 2013
Examples with SWITCH
In order to cover all conditions, you need
3 test cases.
![Page 9: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/9.jpg)
au = -6;
WHILE (ojc && ar || au < 8)
{
ys = dsk - mfg;
au++;
}
Copyright © 2013
Examples with WHILE
In order to cover all conditions, you need
2 test cases.
![Page 10: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/10.jpg)
FOR (kv = 8; kv > -2; kv--)
{
pl = gvp * ge;
}
Copyright © 2013
Examples with FOR
In order to cover all conditions, you need
1 test case.
![Page 11: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/11.jpg)
IF (e || u)
{
IF (bp || oxq || i)
{
IF (gzy || f)
{
n = yo / ocx - uf;
}
}
}
IF (mt && vdi)
{
IF (oye || cos || yxi)
{
IF (uc || nm || mlk)
{
duz = x - pae - tct;
}
}
}
Copyright © 2013
More examples
In order to cover all conditions, you need
3 test cases.
![Page 12: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/12.jpg)
IF (zw || uzq && ppv)
{
e = vqg / obq + qrb;
}
ELSE
{
IF (fl || z)
{
j = qki / on - fbj;
}
ELSE
{
ab = wy * jb;
}
}
ixr = ms + d;
Copyright © 2013
More examples
In order to cover all conditions, you need
2 test cases.
![Page 13: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/13.jpg)
l = jcy * ykj - dp;
FOR (qyt = 1; qyt < 8; qyt++)
{
ew = 15;
WHILE (d || jw || ew > 2)
{
FOR (zw = 9; zw < 16; zw++)
{
syg = v + ha / cls;
}
ew--;
}
}
mmb = wte * il;
Copyright © 2012
More examples
In order to cover all conditions, you need
2 test cases.
![Page 14: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/14.jpg)
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including condition coverage…
Copyright © 2013
![Page 15: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/15.jpg)
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including condition coverage…
Copyright © 2013
Choose the level of nested
statements.
Choose the maximum number of instructions per level.
Choose the type of
coverage from:
statement, decision, codition, multiple
condition, and modified
condition.
Choose the type of
statement.
GENERATE your exercise.
![Page 16: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/16.jpg)
More examples with…
You get pseudocode and sample answers just like during a regular ISTQB exam.
Choose the right answer.
Copyright © 2013
Pseudocode
Choose an answer.
![Page 17: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/17.jpg)
More examples with…
You get pseudocode and sample answers just like during a regular ISTQB exam.
Choose the right answer.
Copyright © 2013
Pseudocode
Your answer
Right answer
![Page 18: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/18.jpg)
How to get it…
Visit TestCompetence.com and get one for only…
Copyright © 2013
EURO / USD
Unlimited number of exercises during 24 hours!
![Page 19: Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence](https://reader034.vdocuments.site/reader034/viewer/2022042623/547aa66d5906b511358b46f7/html5/thumbnails/19.jpg)
Check also examples for…
• Statement testing and coverage >>
• Decision testing and coverage >> • Multiple condition testing and
coverage >>
• Modified condition decision combination (MC/CD) coverage >>
Copyright © 2013