Professional Documents
Culture Documents
with
condition testing: A white box test design technique in which test cases are
designed to execute condition outcomes.
Copyright © 2013
What is…?
Copyright © 2013
Rules!
Copyright © 2013
Examples with sequential code
hiz = xs + pkl;
gff = sy - dr / nxa;
No condition to cover.
Copyright © 2013
Examples with IF
IF (iuc && fow)
{
t = jcc + iky - hhs; In order to cover all
} conditions, you need
2 test cases.
Copyright © 2013
Examples with IF ELSE
IF (r && ha)
{
f = utx + g;
} In order to cover all
ELSE conditions, you need
{ 2 test cases.
mq = nxc * bff * cb;
}
Copyright © 2013
Examples with SWITCH
SWITCH (ck)
{
CASE 0: In order to cover all
jm = c - h; conditions, you need
break; 3 test cases.
CASE 1:
si = pkb * t;
break;
CASE 2:
vh = ocd * fq;
break;
}
Copyright © 2013
Examples with WHILE
Copyright © 2013
Examples with FOR
FOR (kv = 8; kv > -2; kv--)
{
pl = gvp * ge; In order to cover all
} conditions, you need
1 test case.
Copyright © 2013
More examples
IF (e || u)
{
IF (bp || oxq || i)
{ In order to cover all
IF (gzy || f) conditions, you need
{
3 test cases.
n = yo / ocx - uf;
}
}
}
IF (mt && vdi)
{
IF (oye || cos || yxi)
{
IF (uc || nm || mlk)
{
duz = x - pae - tct;
}
}
}
Copyright © 2013
More examples
IF (zw || uzq && ppv)
{
e = vqg / obq + qrb; In order to cover all
} conditions, you need
ELSE 2 test cases.
{
IF (fl || z)
{
j = qki / on - fbj;
}
ELSE
{
ab = wy * jb;
}
}
ixr = ms + d;
Copyright © 2013
More examples
l = jcy * ykj - dp;
FOR (qyt = 1; qyt < 8; qyt++)
{
ew = 15; In order to cover all
WHILE (d || jw || ew > 2) conditions, you need
{ 2 test cases.
FOR (zw = 9; zw < 16; zw++)
{
syg = v + ha / cls;
}
ew--;
}
}
mmb = wte * il;
Copyright © 2012
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including condition coverage…
Copyright © 2013
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including condition coverage…
Choose the
maximum
number of
Choose the instructions
level of per level.
nested
statements. Choose the
type of
Choose the coverage
type of from:
statement. statement,
decision,
codition,
multiple
condition,
GENERATE and modified
your exercise. condition.
Copyright © 2013
More examples with…
You get pseudocode and sample answers just like during a regular ISTQB exam.
Choose the right answer.
Pseudocode
Choose
an answer.
Copyright © 2013
More examples with…
You get pseudocode and sample answers just like during a regular ISTQB exam.
Choose the right answer.
Pseudocode
Your answer
Right answer
Copyright © 2013
How to get it…
Visit TestCompetence.com and get one for only…
EURO / USD
Copyright © 2013
Check also examples for…
• Statement testing and coverage >>
Copyright © 2013