Multiple Condition Testing and Coverage. ISTQB Whitebox Techniques with TestCompetence

Post on 28-Nov-2014

3.791 views 4 download

description

Whitebox techniques - Multiple Condition Testing and Multiple Condition Coverage - prepare yourself for the ISTQB advanced exam for Technical Test Analyst and Test Analyst.

Transcript of Multiple Condition Testing and Coverage. ISTQB Whitebox Techniques with TestCompetence

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

vwj = v - w * yas;

cxd = h - j * emg;

Copyright © 2013

Examples with sequential code

No multiple condition to cover.

mf = ta / kfa;

IF (g || cn || iyl)

{

msa = si + rr;

}

Copyright © 2013

Examples with IF

In order to cover all multiple conditions, you

need 8 test cases.

IF (nk || c && qq)

{

j = ce * a;

}

ELSE

{

nde = bb - v / zk;

}

djk = d / fgw;

Copyright © 2013

Examples with IF ELSE

In order to cover all multiple conditions, you

need 8 test cases.

tr = j - ap;

SWITCH (zk)

{

CASE 0:

dvp = vev * pot;

break;

CASE 1:

b = ut + e;

break;

}

Copyright © 2013

Examples with SWITCH

In order to cover all multiple conditions, you

need 2 test cases.

e = 4;

WHILE (s || qa || e > -7)

{

kt = ngk * bcw;

e--;

}

ot = cg - nmv / r;

Copyright © 2013

Examples with WHILE

In order to cover all multiple conditions, you

need 4 test cases.

b = cq + bm;

FOR (htk = 9; htk < 15; htk++)

{

u = sjj / ol;

}

Copyright © 2013

Examples with FOR

In order to cover all multiple conditions, you

need 1 test case.

FOR (gc = 0; gc < 4; gc++)

{

IF (s || vjq && mp)

{

c = gmg / qck;

}

}

ir = k + yx - fj;

Copyright © 2013

More examples

In order to cover all multiple conditions, you

need 8 test cases.

IF (o && da && iwd)

{

new = i + tnb + xw;

}

IF (xc || cwk)

{

xck = nyt + sq;

}

ELSE

{

IF (mbo || atj || xny)

{

iq = uu * a;

}

ELSE

{

uh = tu * en - vt;

}

}

Copyright © 2013

More examples

In order to cover all multiple conditions, you

need 11 test cases.

SWITCH (wk)

{

CASE 0:

IF (jo && mme)

{

bmw = w - l / h;

}

break;

CASE 1:

IF (y || cm && td)

{

sjc = he / eqw;

}

break;

}

ype = d + boy;

Copyright © 2012

More examples

In order to cover all multiple conditions, you

need 12 test cases.

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…

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.

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.

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

How to get it…

Visit TestCompetence.com and get one for only…

Copyright © 2013

EURO / USD

Unlimited number of exercises during 24 hours!