Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence

14,339 views

Published on

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

Published in: Education
  • Be the first to comment

Condition Testing and Condition Coverage. ISTQB White-Box Techniques with TestCompetence

  1. 1. Condition Testing and Condition Coverage withPrepare yourself for the ISTQB exam
  2. 2. Dictionarycondition: 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 aredesigned to execute condition outcomes.compound condition: Two or more single conditions joined by means of a logicaloperator (AND, OR or XOR), e.g. ‘A>B AND C>1000’.condition coverage: The percentage of condition outcomes that have beenexercised by a test suite. 100% condition coverage requires each single condition inevery decision statement to be tested as True and False. From „Standard glossary of terms used in Software Testing” Copyright © 2013
  3. 3. What is…?Condition coverage, there are stronger levels ofstructural coverage beyond decision coverage, forexample, condition coverage. From „Certified Tester Foundation Level Syllabus (version 2011)” Copyright © 2013
  4. 4. Rules! branch condition = conditionbranch condition coverage = condition coverage From „Certified Tester Foundation Level Syllabus (version 2011)”Copyright © 2013
  5. 5. Examples with sequential codehiz = xs + pkl;gff = sy - dr / nxa; No condition to cover.Copyright © 2013
  6. 6. Examples with IFIF (iuc && fow){ t = jcc + iky - hhs; In order to cover all} conditions, you need 2 test cases.Copyright © 2013
  7. 7. Examples with IF ELSEIF (r && ha){ f = utx + g;} In order to cover allELSE conditions, you need{ 2 test cases. mq = nxc * bff * cb;}Copyright © 2013
  8. 8. Examples with SWITCHSWITCH (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
  9. 9. Examples with WHILE In order to cover allau = -6; conditions, you needWHILE (ojc && ar || au < 8) 2 test cases.{ ys = dsk - mfg; au++;}Copyright © 2013
  10. 10. Examples with FORFOR (kv = 8; kv > -2; kv--){ pl = gvp * ge; In order to cover all} conditions, you need 1 test case.Copyright © 2013
  11. 11. More examplesIF (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
  12. 12. More examplesIF (zw || uzq && ppv){ e = vqg / obq + qrb; In order to cover all} conditions, you needELSE 2 test cases.{ IF (fl || z) { j = qki / on - fbj; } ELSE { ab = wy * jb; }}ixr = ms + d;Copyright © 2013
  13. 13. More examplesl = 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
  14. 14. More examples with…TestCompetence allows you to generate sample pseudocode to pracitse whiteboxtechniques including condition coverage… Copyright © 2013
  15. 15. More examples with…TestCompetence allows you to generate sample pseudocode to pracitse whiteboxtechniques 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
  16. 16. 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
  17. 17. 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
  18. 18. How to get it…Visit TestCompetence.com and get one for only… EURO / USD Unlimited number of exercises during 24 hours!Copyright © 2013
  19. 19. 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

×