Sei sulla pagina 1di 20

Multiple Condition Testing and Multiple Condition Coverage

with

Prepare yourself for the ISTQB exam


Dictionary

multiple condition coverage: The percentage of


combinations of all single condition outcomes within one
statement that have been exercised by a test suite.
100% multiple condition coverage implies 100%
condition determination coverage.

multiple condition testing: A white box test design


technique in which test cases are designed to execute
combinations of single condition outcomes (within one
statement).

From „Standard glossary of terms used in Software Testing”

Copyright © 2013
What is…?!!

Multiple condition testing - all possible combinations of


true/false conditions are identified.

From „Certified Tester Advanced Level Syllabus (version 2007)”

Copyright © 2013
Rules!!

100% multiple condition coverage implies


100% condition determination coverage

branch condition combination coverage = multiple condition coverage


condition combination coverage = multiple condition coverage

branch condition combination testing = multiple condition testing


condition combination testing = multiple condition testing

From „Certified Tester Advanced Level Syllabus (version 2007)”

Copyright © 2013
Examples with sequential code
vwj = v - w * yas;
cxd = h - j * emg;

No multiple condition to
cover.

Copyright © 2013
Examples with IF
mf = ta / kfa;
IF (g || cn || iyl)
{
msa = si + rr; In order to cover all
} multiple conditions, you
need 8 test cases.

Copyright © 2013
Examples with IF ELSE
IF (nk || c && qq)
{
j = ce * a;
} In order to cover all
ELSE multiple conditions, you
{ need 8 test cases.
nde = bb - v / zk;
}
djk = d / fgw;

Copyright © 2013
Examples with SWITCH
tr = j - ap;
SWITCH (zk)
{ In order to cover all
CASE 0: multiple conditions, you
dvp = vev * pot; need 2 test cases.
break;
CASE 1:
b = ut + e;
break;
}

Copyright © 2013
Examples with WHILE
e = 4;
WHILE (s || qa || e > -7)
{ In order to cover all
kt = ngk * bcw; multiple conditions, you
e--; need 4 test cases.
}
ot = cg - nmv / r;

Copyright © 2013
Examples with FOR
b = cq + bm;
FOR (htk = 9; htk < 15; htk++)
{ In order to cover all
u = sjj / ol; multiple conditions, you
} need 1 test case.

Copyright © 2013
More examples
FOR (gc = 0; gc < 4; gc++)
{
IF (s || vjq && mp)
{
In order to cover all
c = gmg / qck;
} multiple conditions, you
} need 8 test cases.
ir = k + yx - fj;

Copyright © 2013
More examples
IF (o && da && iwd)
{
new = i + tnb + xw;
} In order to cover all
IF (xc || cwk) multiple conditions, you
{
need 11 test cases.
xck = nyt + sq;
}
ELSE
{
IF (mbo || atj || xny)
{
iq = uu * a;
}
ELSE
{
uh = tu * en - vt;
}
}

Copyright © 2013
More examples
SWITCH (wk)
{
CASE 0:
IF (jo && mme) In order to cover all
{ multiple conditions, you
bmw = w - l / h;
need 12 test cases.
}
break;
CASE 1:
IF (y || cm && td)
{
sjc = he / eqw;
}
break;
}
ype = d + boy;

Copyright © 2012
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including multiple condition coverage…

Copyright © 2013
More examples with…
TestCompetence allows you to generate sample pseudocode to pracitse whitebox
techniques including multiple 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

Unlimited number of exercises during 24 hours!

Copyright © 2013
Check also examples for…
• Statement testing and coverage >>

• Decision testing and coverage >>

• Condition testing and coverage >>

• Modified condition decision


combination (MC/CD) coverage >>

Copyright © 2013

Potrebbero piacerti anche