condition determination testing and coverage. istqb white-box techniques with testcompetence

19
Condition Determination Testing and Coverage with Prepare yourself for the ISTQB exam

Upload: radoslaw-smilgin

Post on 29-Nov-2014

2.148 views

Category:

Documents


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

Condition Determination Testing and Coverage with

Prepare yourself for the ISTQB exam

Page 2: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

Dictionary

condition determination testing: A white box test design technique in which test cases are independently affect a decision outcome that have been exercised by a test case suite.100 % condition determination coverage implies 100 % decision condition coverage condition determination coverage: The percentage of all single condition outcomes that independently affect a decision outcome that have been exercised by a test case suite. 100% condition determination coverage implies 100% decision condition coverage.

From „Certified Tester Foundation Level Syllabus (version 2011)”

Copyright © 2013

Page 3: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

Rules!!

Condition determination testing - the possible combinations of true/false conditions that can affect decisions (branches) are identified.

100% multiple condition coverage implies 100% condition determination coverage modified condition decision coverage (MC/DC) = condition determination coverage

modified multiple condition coverage = condition determination coverage modified condition decision testing = condition determination testing modified multiple condition testing = condition determination testing

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

Copyright © 2013

Page 4: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

bs = yan + bq + ad;

h = e * bja;

Copyright © 2013

Examples with sequential code

There are no conditions to cover.

Page 5: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

h = lqy + rh * enh;

IF (cc && t || mva)

{

tw = k - f / j;

}

Copyright © 2013

Examples with IF

In order to cover all modified multiple

conditions, you need 4 test cases.

Page 6: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

IF (ta && k && a)

{

p = ucc - wk - g;

}

ELSE

{

j = c / cws - ld;

}

gwe = pzn - wv;

Copyright © 2013

Examples with IF ELSE

In order to cover all modified multiple

conditions, you need 4 test cases.

Page 7: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

ol = or * k + zbo;

SWITCH (hz)

{

CASE 0:

m = g + pwu;

break;

CASE 1:

h = pgm + xh;

break;

}

Copyright © 2013

Examples with SWITCH

In order to cover all modified multiple

conditions, you need 2 test cases.

Page 8: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

zl = ff * br;

vf = -5;

WHILE (o && n || vf < 1)

{

yxx = uum / azc / p;

vf++;

}

Copyright © 2013

Examples with WHILE

In order to cover all modified multiple

conditions, you need 3 test cases.

Page 9: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

FOR (mq = -4; mq > -8; mq--)

{

dsq = q * ry - tqw;

}

Copyright © 2013

Examples with FOR

In order to cover all modified multiple

conditions, you need 1 test case.

Page 10: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

mz = e / jxu * du;

ldy = rt + p;

IF (foi || xpm)

{

IF (gt || k || g)

{

tmr = qjy + w / br;

}

ELSE

{

IF (yi || n && bk)

{

bwi = tl + be + eae;

}

ELSE

{

lz = gz - eg * qp;

}

}

}

ELSE

{

sts = ap * yv;

}

Copyright © 2013

More examples

In order to cover all modified multiple

conditions, you need 5 test cases.

Page 11: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

s = 12;

WHILE (dfy && o || s > -1)

{

tjj = d + ce;

s--;

}

cb = -8;

WHILE (jdh && byw || cb < 1)

{

x = 14;

WHILE (dvc && w || x > 8)

{

tec = -16;

WHILE (t && ll || tec < -8)

{

n = gp * co + lv;

tec++;

}

x--;

}

cb++;

}

Copyright © 2013

More examples

In order to cover all modified multiple

conditions, you need 5 test cases.

Page 12: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

SWITCH (dqw)

{

CASE 0:

x = jbv * wkm + suo;

break;

CASE 1:

zo = lu / ojj / jxc;

break;

DEFAULT:

ik = fvu + ygq;

break;

}

IF (y || uq)

{

rnl = qt - ex + xp;

}

Copyright © 2012

More examples

In order to cover all modified multiple

conditions, you need 3 test cases.

Page 13: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

More examples with…

TestCompetence allows you to generate sample pseudocode to pracitse whitebox

techniques including condition determination coverage…

Copyright © 2013

Page 14: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

More examples with…

TestCompetence allows you to generate sample pseudocode to pracitse whitebox

techniques including condition determination 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 15: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

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 16: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

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 17: Condition Determination Testing and Coverage. ISTQB White-box Techniques with TestCompetence

How to get it…

Visit TestCompetence.com and get one for only…

Copyright © 2013

EURO / USD

Unlimited number of exercises during 24 hours!