SlideShare a Scribd company logo
1 of 13
Download to read offline
Copyright © 2005-2011 www.universalexams.com
ISEB/ISTQB Foundation – Worksheet A
Structure-based or white-box techniques
Version - 2011
Overview
This supplementary worksheet contains questions regarding ‘Statement’ and ‘Branch Decision’
testing which will appear in the actual ISEB/ISTQB Foundation exam. Many candidates have
problems fully understanding the concepts involved, but by being able to successfully complete
the example questions below, the candidate should have an increased possibility of getting the
answer right in the real exam.
Any unauthorised copying or re-selling of the contents of this document without
permission will constitute an infringement of copyright.
Commercial copying, re-selling, hiring, lending is strictly prohibited.
WWW.UNIVERSALEXAMS.COM
Page 2
Copyright © 2005-2011 www.universalexams.com
1 Practice Questions
Question 1:
Ask: “What type of bread do you require, white or brown?”
IF the customer wants ‘brown’
Ask: “Which type, sliced or un-sliced?”
IF the customer replies ‘un-sliced’
Say: “That will be 95p”
ELSE
Say: “That will be 65p”
ENDIF
ELSE
Say: “That will be 75p”
ENDIF
How many tests are required to achieve full Branch Coverage?
a) 3
b) 4
c) 5
d) 6
Question 2:
Which statement is true regarding the minimum number of test cases required for full statement
and branch coverage?
Read G
Read K
IF G + K > 80 THEN
Print "The value is quite large"
ENDIF
IF G > 50 THEN
Print "G is a large value"
ENDIF
a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 2 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
WWW.UNIVERSALEXAMS.COM
Page 3
Copyright © 2005-2011 www.universalexams.com
Question 3:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
If A = 3 then
Display_message A;
If B = 2 then
Display_message B;
Else
Display_message C;
Else
Display_message D;
a). 1
b). 2
c). 3
d). 4
Question 4:
If the code below was part of a program, how many tests are required to achieve 100%
branch/decision coverage?
If A = 3 then
Display_message A;
If B = 2 then
Display_message B;
Else
Display_message C;
Else
Display_message C;
a). 1
b). 2
c). 3
d). 4
WWW.UNIVERSALEXAMS.COM
Page 4
Copyright © 2005-2011 www.universalexams.com
Question 5:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
Read A
Read B
IF A<0 THEN
Print "A negative"
ENDIF
IF B<0 THEN
Print "B negative"
ENDIF
a). 1
b). 2
c). 3
d). 4
Question 6:
Ask: “Are you a male or a female?”
IF the person says ‘female’
Ask: “Are you married or single?”
IF the person says ‘Single’
Say: “Start your name with Miss”
ELSE
Say: “Start your name with Mrs.”
ENDIF
ELSE
Say: “Start your name with ‘Mr.”
ENDIF
How many tests are required to achieve full Branch Coverage?
a) 4
b) 3
c) 5
d) 6
WWW.UNIVERSALEXAMS.COM
Page 5
Copyright © 2005-2011 www.universalexams.com
Question 7:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
Read A
IF A<0 THEN
Print "A negative"
ENDIF
IF A>0 THEN
Print "A positive"
ENDIF
a). 1
b). 2
c). 3
d). 4
WWW.UNIVERSALEXAMS.COM
Page 6
Copyright © 2005-2011 www.universalexams.com
2 Answers
Question 1:
Ask: “What type of bread do you require, white or brown?”
IF the customer wants ‘brown’
Ask: “Which type, sliced or un-sliced?”
IF the customer replies ‘un-sliced’
Say: “That will be 95p”
ELSE
Say: “That will be 65p”
ENDIF
ELSE
Say: “That will be 75p”
ENDIF
How many tests are required to achieve full Branch Coverage?
a) 3
b) 4
c) 5
d) 6
The correct answer is A:
Test case 1: The customer asks for brown and sliced bread
Test case 2: The customer asks for brown and un-sliced bread
Test case 3: The customer asks for white bread
Question 2:
WWW.UNIVERSALEXAMS.COM
Page 7
Copyright © 2005-2011 www.universalexams.com
Which statement is true regarding the minimum number of test cases required for full statement
and branch coverage?
Read G
Read K
IF G + K > 80 THEN
Print "The value is quite large"
ENDIF
IF G > 50 THEN
Print "G is a large value"
ENDIF
a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 2 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
The correct answer is B:
Test case 1: G=60, K=30 which exercises both of the ‘Print’ statements
Test case 2: G=60, K=30 which tests the ‘true’ outcomes of the ‘IF’ statements
Test case 3: G=49, K=30 which tests the ‘false’ outcomes of the ‘IF’ statements
WWW.UNIVERSALEXAMS.COM
Page 8
Copyright © 2005-2011 www.universalexams.com
Question 3:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
If A = 3 then
Display_message A;
If B = 2 then
Display_message B;
Else
Display_message C;
Else
Display_message D;
a). 1
b). 2
c). 3
d). 4
The correct answer is C:
Test case 1: A=3, B=2 which would display message A and message B
Test case 2: A=3, B=1 which would display message A and message C
Test case 3: A=4, B=2 which would display message D
WWW.UNIVERSALEXAMS.COM
Page 9
Copyright © 2005-2011 www.universalexams.com
Question 4:
If the code below was part of a program, how many tests are required to achieve 100%
branch/decision coverage?
If A = 3 then
Display_message A;
If B = 2 then
Display_message B;
Else
Display_message C;
Else
Display_message C;
a). 1
b). 2
c). 3
d). 4
The correct answer is C:
Test case 1: A=3, B=2 which tests the ‘true’ outcomes of the ‘IF’ statements
Test case 2: A=4, B=4 which tests the ‘false’ outcomes of the first ‘IF’ statement
Test case 2: A=3, B=4 which tests the ‘false’ outcome of the second ‘IF’ statement
WWW.UNIVERSALEXAMS.COM
Page 10
Copyright © 2005-2011 www.universalexams.com
Question 5:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
Read A
Read B
IF A<0 THEN
Print "A negative"
ENDIF
IF B<0 THEN
Print "B negative"
ENDIF
a). 1
b). 2
c). 3
d). 4
The correct answer is A:
Test case 1: A= -4, B= -5 which exercises both of the ‘Print’ statements
WWW.UNIVERSALEXAMS.COM
Page 11
Copyright © 2005-2011 www.universalexams.com
Question 6:
Ask: “Are you a male or a female?”
IF the person says ‘female’
Ask: “Are you married or single?”
IF the person says ‘Single’
Say: “Start your name with Miss”
ELSE
Say: “Start your name with Mrs.”
ENDIF
ELSE
Say: “Start your name with ‘Mr.”
ENDIF
How many tests are required to achieve full Branch Coverage?
a) 4
b) 3
c) 5
d) 6
The correct answer is B:
Test case 1: ‘Male’ which tests the ‘false’ outcome of the first ‘IF’ statement
Test case 2: ‘Female & Married’ which tests the ‘false’ outcome of the second ‘IF’ statement, and
also the ‘true’ outcome of the first ‘IF’ statement
Test case 3: ‘Female & Single’ which tests the ‘true’ outcome of the second ‘IF’ statement
WWW.UNIVERSALEXAMS.COM
Page 12
Copyright © 2005-2011 www.universalexams.com
Question 7:
If the code below was part of a program, how many tests are required to achieve 100%
statement coverage?
Read A
IF A<0 THEN
Print "A negative"
ENDIF
IF A>0 THEN
Print "A positive"
ENDIF
a). 1
b). 2
c). 3
d). 4
The correct answer is B:
Test case 1: A= -4, which exercises the first ‘Print’ statement
Test case 2: A= 4, which exercises the second ‘Print’ statement
WWW.UNIVERSALEXAMS.COM
Page 13
Copyright © 2005-2011 www.universalexams.com
3 Pre-test Tips
Here are some ideas on how to calculate the amount of ‘Statement’ and ‘Branch Decision’ test
cases quickly and efficiently, which can be used in our examples, and more importantly in the real
exam.
Statements:
1) Go through the example code and note down all of the ‘executable’ statements. (In the
exam these will normally be ‘Print’ statements).
2) Work out what will need to occur to execute these statements.
3) Now calculate the minimum amount of test cases required to achieve this.
Branch Decisions:
1) Go through the example code and note down all of the ‘IF’ decisions.
2) Now note down all of the ‘True’ outcomes of the ‘IF’ decisions
3) Now note down all of the ‘False’ outcomes of the ‘IF’ decisions
4) Now calculate the minimum amount of test cases required to exercise all of the decisions.

More Related Content

What's hot

Motivational Interviewing lecture
Motivational Interviewing lecture Motivational Interviewing lecture
Motivational Interviewing lecture Sovann Pen
 
Denial Management - Medical billing
Denial Management - Medical billingDenial Management - Medical billing
Denial Management - Medical billingLeanmedicalbilling
 
Sample California demurrer to complaint for breach of contract
Sample California demurrer to  complaint for breach of contractSample California demurrer to  complaint for breach of contract
Sample California demurrer to complaint for breach of contractLegalDocsPro
 
self affirmation presentation.pptx
self affirmation presentation.pptxself affirmation presentation.pptx
self affirmation presentation.pptxKavitha Krishnan
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software TestingNishant Worah
 
Sample meet and confer declaration for motion for judgment on the pleadings i...
Sample meet and confer declaration for motion for judgment on the pleadings i...Sample meet and confer declaration for motion for judgment on the pleadings i...
Sample meet and confer declaration for motion for judgment on the pleadings i...LegalDocsPro
 
Denial management presentation
Denial management   presentationDenial management   presentation
Denial management presentationLeanmedicalbilling
 
Sample demurrer for another action pending in California
Sample demurrer for another action pending in CaliforniaSample demurrer for another action pending in California
Sample demurrer for another action pending in CaliforniaLegalDocsPro
 
Sample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatoriesSample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatoriesLegalDocsPro
 
powerpoint template for testing training
powerpoint template for testing trainingpowerpoint template for testing training
powerpoint template for testing trainingJohn Roddy
 
Ar scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and askedAr scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and askedJvs Prasad
 
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...Radoslaw Smilgin
 
Social Engineering - Are You Protecting Your Data Enough?
Social Engineering - Are You Protecting Your Data Enough?Social Engineering - Are You Protecting Your Data Enough?
Social Engineering - Are You Protecting Your Data Enough?JamRivera1
 
Nbp notice to buyer to perform - 410
Nbp   notice to buyer to perform - 410Nbp   notice to buyer to perform - 410
Nbp notice to buyer to perform - 410cdukelow
 

What's hot (20)

Motivational Interviewing lecture
Motivational Interviewing lecture Motivational Interviewing lecture
Motivational Interviewing lecture
 
Denial Management - Medical billing
Denial Management - Medical billingDenial Management - Medical billing
Denial Management - Medical billing
 
Sample California demurrer to complaint for breach of contract
Sample California demurrer to  complaint for breach of contractSample California demurrer to  complaint for breach of contract
Sample California demurrer to complaint for breach of contract
 
self affirmation presentation.pptx
self affirmation presentation.pptxself affirmation presentation.pptx
self affirmation presentation.pptx
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
H A C K I N Gjk,K
H A C K I N Gjk,KH A C K I N Gjk,K
H A C K I N Gjk,K
 
Medical Billing 101
Medical Billing 101Medical Billing 101
Medical Billing 101
 
Sample meet and confer declaration for motion for judgment on the pleadings i...
Sample meet and confer declaration for motion for judgment on the pleadings i...Sample meet and confer declaration for motion for judgment on the pleadings i...
Sample meet and confer declaration for motion for judgment on the pleadings i...
 
Denial management presentation
Denial management   presentationDenial management   presentation
Denial management presentation
 
Sample demurrer for another action pending in California
Sample demurrer for another action pending in CaliforniaSample demurrer for another action pending in California
Sample demurrer for another action pending in California
 
Sample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatoriesSample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatories
 
Software testing
Software testingSoftware testing
Software testing
 
powerpoint template for testing training
powerpoint template for testing trainingpowerpoint template for testing training
powerpoint template for testing training
 
Ar scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and askedAr scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and asked
 
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...
Statement Testing and Statement Coverage. ISTQB whitebox techniques with Test...
 
Social Engineering - Are You Protecting Your Data Enough?
Social Engineering - Are You Protecting Your Data Enough?Social Engineering - Are You Protecting Your Data Enough?
Social Engineering - Are You Protecting Your Data Enough?
 
Topic 5 chapter 7
Topic 5 chapter 7Topic 5 chapter 7
Topic 5 chapter 7
 
Social Engineering
Social EngineeringSocial Engineering
Social Engineering
 
Nbp notice to buyer to perform - 410
Nbp   notice to buyer to perform - 410Nbp   notice to buyer to perform - 410
Nbp notice to buyer to perform - 410
 
Lecture 4 phase 1 safety & stabilization
Lecture 4 phase 1 safety & stabilizationLecture 4 phase 1 safety & stabilization
Lecture 4 phase 1 safety & stabilization
 

Similar to Worksheet a

Iseb question from book
Iseb question from bookIseb question from book
Iseb question from bookNatalia Iurii
 
Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019DerrickDNealon
 
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4onsoftwaretest
 
St0 155 question answers
St0 155 question answersSt0 155 question answers
St0 155 question answersMarcoMCervantes
 
Information security foundation based on iso iec 27002
Information security foundation based on iso   iec 27002Information security foundation based on iso   iec 27002
Information security foundation based on iso iec 27002Ajay Kumar Gupta
 
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...Muhammad Jazman
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011Helen Nguyễn
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011Akash gupta
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011TestingGeeks
 
Quiz3 tonghop
 Quiz3 tonghop Quiz3 tonghop
Quiz3 tonghopDaewoo Han
 
Assessment – SITXOHS003BStudent name ____________________________.docx
Assessment – SITXOHS003BStudent name ____________________________.docxAssessment – SITXOHS003BStudent name ____________________________.docx
Assessment – SITXOHS003BStudent name ____________________________.docxfredharris32
 
Unlocking Success A Comprehensive Guide to the CORe Certification Exam
Unlocking Success A Comprehensive Guide to the CORe Certification ExamUnlocking Success A Comprehensive Guide to the CORe Certification Exam
Unlocking Success A Comprehensive Guide to the CORe Certification ExamAliza Oscar
 
Stop multiplying by 4 nyphp
Stop multiplying by 4 nyphpStop multiplying by 4 nyphp
Stop multiplying by 4 nyphpChuck Reeves
 
MATH 302 Final Exam
MATH 302 Final ExamMATH 302 Final Exam
MATH 302 Final ExamDafnaHabrew
 
BUSI 620 Inspiring Innovation/tutorialrank.com
 BUSI 620 Inspiring Innovation/tutorialrank.com BUSI 620 Inspiring Innovation/tutorialrank.com
BUSI 620 Inspiring Innovation/tutorialrank.comjonhson108
 
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxInstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxdirkrplav
 
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docxTake Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docxdeanmtaylor1545
 
Findings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport WritingFindings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport WritingShainaBoling829
 
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docxECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docxjack60216
 

Similar to Worksheet a (20)

Iseb question from book
Iseb question from bookIseb question from book
Iseb question from book
 
Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019
 
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4
 
St0 155 question answers
St0 155 question answersSt0 155 question answers
St0 155 question answers
 
Information security foundation based on iso iec 27002
Information security foundation based on iso   iec 27002Information security foundation based on iso   iec 27002
Information security foundation based on iso iec 27002
 
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...
Graham et.al, 2008, Foundations of Software Testing ISTQB Certification. Chap...
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
 
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
 
Quiz3 tonghop
 Quiz3 tonghop Quiz3 tonghop
Quiz3 tonghop
 
Assessment – SITXOHS003BStudent name ____________________________.docx
Assessment – SITXOHS003BStudent name ____________________________.docxAssessment – SITXOHS003BStudent name ____________________________.docx
Assessment – SITXOHS003BStudent name ____________________________.docx
 
Unlocking Success A Comprehensive Guide to the CORe Certification Exam
Unlocking Success A Comprehensive Guide to the CORe Certification ExamUnlocking Success A Comprehensive Guide to the CORe Certification Exam
Unlocking Success A Comprehensive Guide to the CORe Certification Exam
 
Stop multiplying by 4 nyphp
Stop multiplying by 4 nyphpStop multiplying by 4 nyphp
Stop multiplying by 4 nyphp
 
MATH 302 Final Exam
MATH 302 Final ExamMATH 302 Final Exam
MATH 302 Final Exam
 
BUSI 620 Inspiring Innovation/tutorialrank.com
 BUSI 620 Inspiring Innovation/tutorialrank.com BUSI 620 Inspiring Innovation/tutorialrank.com
BUSI 620 Inspiring Innovation/tutorialrank.com
 
15 Free PMP Exam Questions
15 Free PMP Exam Questions15 Free PMP Exam Questions
15 Free PMP Exam Questions
 
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docxInstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
 
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docxTake Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
 
Findings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport WritingFindings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport Writing
 
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docxECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
 

Recently uploaded

Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...sonatiwari757
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
Call Girls in Mayur Vihar ✔️ 9711199171 ✔️ Delhi ✔️ Enjoy Call Girls With Our...
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 

Worksheet a

  • 1. Copyright © 2005-2011 www.universalexams.com ISEB/ISTQB Foundation – Worksheet A Structure-based or white-box techniques Version - 2011 Overview This supplementary worksheet contains questions regarding ‘Statement’ and ‘Branch Decision’ testing which will appear in the actual ISEB/ISTQB Foundation exam. Many candidates have problems fully understanding the concepts involved, but by being able to successfully complete the example questions below, the candidate should have an increased possibility of getting the answer right in the real exam. Any unauthorised copying or re-selling of the contents of this document without permission will constitute an infringement of copyright. Commercial copying, re-selling, hiring, lending is strictly prohibited.
  • 2. WWW.UNIVERSALEXAMS.COM Page 2 Copyright © 2005-2011 www.universalexams.com 1 Practice Questions Question 1: Ask: “What type of bread do you require, white or brown?” IF the customer wants ‘brown’ Ask: “Which type, sliced or un-sliced?” IF the customer replies ‘un-sliced’ Say: “That will be 95p” ELSE Say: “That will be 65p” ENDIF ELSE Say: “That will be 75p” ENDIF How many tests are required to achieve full Branch Coverage? a) 3 b) 4 c) 5 d) 6 Question 2: Which statement is true regarding the minimum number of test cases required for full statement and branch coverage? Read G Read K IF G + K > 80 THEN Print "The value is quite large" ENDIF IF G > 50 THEN Print "G is a large value" ENDIF a) 1 test for statement coverage, 1 for branch coverage b) 1 test for statement coverage, 2 for branch coverage c) 2 test for statement coverage, 1 for branch coverage d) 2 tests for statement coverage, 2 for branch coverage
  • 3. WWW.UNIVERSALEXAMS.COM Page 3 Copyright © 2005-2011 www.universalexams.com Question 3: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? If A = 3 then Display_message A; If B = 2 then Display_message B; Else Display_message C; Else Display_message D; a). 1 b). 2 c). 3 d). 4 Question 4: If the code below was part of a program, how many tests are required to achieve 100% branch/decision coverage? If A = 3 then Display_message A; If B = 2 then Display_message B; Else Display_message C; Else Display_message C; a). 1 b). 2 c). 3 d). 4
  • 4. WWW.UNIVERSALEXAMS.COM Page 4 Copyright © 2005-2011 www.universalexams.com Question 5: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? Read A Read B IF A<0 THEN Print "A negative" ENDIF IF B<0 THEN Print "B negative" ENDIF a). 1 b). 2 c). 3 d). 4 Question 6: Ask: “Are you a male or a female?” IF the person says ‘female’ Ask: “Are you married or single?” IF the person says ‘Single’ Say: “Start your name with Miss” ELSE Say: “Start your name with Mrs.” ENDIF ELSE Say: “Start your name with ‘Mr.” ENDIF How many tests are required to achieve full Branch Coverage? a) 4 b) 3 c) 5 d) 6
  • 5. WWW.UNIVERSALEXAMS.COM Page 5 Copyright © 2005-2011 www.universalexams.com Question 7: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? Read A IF A<0 THEN Print "A negative" ENDIF IF A>0 THEN Print "A positive" ENDIF a). 1 b). 2 c). 3 d). 4
  • 6. WWW.UNIVERSALEXAMS.COM Page 6 Copyright © 2005-2011 www.universalexams.com 2 Answers Question 1: Ask: “What type of bread do you require, white or brown?” IF the customer wants ‘brown’ Ask: “Which type, sliced or un-sliced?” IF the customer replies ‘un-sliced’ Say: “That will be 95p” ELSE Say: “That will be 65p” ENDIF ELSE Say: “That will be 75p” ENDIF How many tests are required to achieve full Branch Coverage? a) 3 b) 4 c) 5 d) 6 The correct answer is A: Test case 1: The customer asks for brown and sliced bread Test case 2: The customer asks for brown and un-sliced bread Test case 3: The customer asks for white bread Question 2:
  • 7. WWW.UNIVERSALEXAMS.COM Page 7 Copyright © 2005-2011 www.universalexams.com Which statement is true regarding the minimum number of test cases required for full statement and branch coverage? Read G Read K IF G + K > 80 THEN Print "The value is quite large" ENDIF IF G > 50 THEN Print "G is a large value" ENDIF a) 1 test for statement coverage, 1 for branch coverage b) 1 test for statement coverage, 2 for branch coverage c) 2 test for statement coverage, 1 for branch coverage d) 2 tests for statement coverage, 2 for branch coverage The correct answer is B: Test case 1: G=60, K=30 which exercises both of the ‘Print’ statements Test case 2: G=60, K=30 which tests the ‘true’ outcomes of the ‘IF’ statements Test case 3: G=49, K=30 which tests the ‘false’ outcomes of the ‘IF’ statements
  • 8. WWW.UNIVERSALEXAMS.COM Page 8 Copyright © 2005-2011 www.universalexams.com Question 3: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? If A = 3 then Display_message A; If B = 2 then Display_message B; Else Display_message C; Else Display_message D; a). 1 b). 2 c). 3 d). 4 The correct answer is C: Test case 1: A=3, B=2 which would display message A and message B Test case 2: A=3, B=1 which would display message A and message C Test case 3: A=4, B=2 which would display message D
  • 9. WWW.UNIVERSALEXAMS.COM Page 9 Copyright © 2005-2011 www.universalexams.com Question 4: If the code below was part of a program, how many tests are required to achieve 100% branch/decision coverage? If A = 3 then Display_message A; If B = 2 then Display_message B; Else Display_message C; Else Display_message C; a). 1 b). 2 c). 3 d). 4 The correct answer is C: Test case 1: A=3, B=2 which tests the ‘true’ outcomes of the ‘IF’ statements Test case 2: A=4, B=4 which tests the ‘false’ outcomes of the first ‘IF’ statement Test case 2: A=3, B=4 which tests the ‘false’ outcome of the second ‘IF’ statement
  • 10. WWW.UNIVERSALEXAMS.COM Page 10 Copyright © 2005-2011 www.universalexams.com Question 5: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? Read A Read B IF A<0 THEN Print "A negative" ENDIF IF B<0 THEN Print "B negative" ENDIF a). 1 b). 2 c). 3 d). 4 The correct answer is A: Test case 1: A= -4, B= -5 which exercises both of the ‘Print’ statements
  • 11. WWW.UNIVERSALEXAMS.COM Page 11 Copyright © 2005-2011 www.universalexams.com Question 6: Ask: “Are you a male or a female?” IF the person says ‘female’ Ask: “Are you married or single?” IF the person says ‘Single’ Say: “Start your name with Miss” ELSE Say: “Start your name with Mrs.” ENDIF ELSE Say: “Start your name with ‘Mr.” ENDIF How many tests are required to achieve full Branch Coverage? a) 4 b) 3 c) 5 d) 6 The correct answer is B: Test case 1: ‘Male’ which tests the ‘false’ outcome of the first ‘IF’ statement Test case 2: ‘Female & Married’ which tests the ‘false’ outcome of the second ‘IF’ statement, and also the ‘true’ outcome of the first ‘IF’ statement Test case 3: ‘Female & Single’ which tests the ‘true’ outcome of the second ‘IF’ statement
  • 12. WWW.UNIVERSALEXAMS.COM Page 12 Copyright © 2005-2011 www.universalexams.com Question 7: If the code below was part of a program, how many tests are required to achieve 100% statement coverage? Read A IF A<0 THEN Print "A negative" ENDIF IF A>0 THEN Print "A positive" ENDIF a). 1 b). 2 c). 3 d). 4 The correct answer is B: Test case 1: A= -4, which exercises the first ‘Print’ statement Test case 2: A= 4, which exercises the second ‘Print’ statement
  • 13. WWW.UNIVERSALEXAMS.COM Page 13 Copyright © 2005-2011 www.universalexams.com 3 Pre-test Tips Here are some ideas on how to calculate the amount of ‘Statement’ and ‘Branch Decision’ test cases quickly and efficiently, which can be used in our examples, and more importantly in the real exam. Statements: 1) Go through the example code and note down all of the ‘executable’ statements. (In the exam these will normally be ‘Print’ statements). 2) Work out what will need to occur to execute these statements. 3) Now calculate the minimum amount of test cases required to achieve this. Branch Decisions: 1) Go through the example code and note down all of the ‘IF’ decisions. 2) Now note down all of the ‘True’ outcomes of the ‘IF’ decisions 3) Now note down all of the ‘False’ outcomes of the ‘IF’ decisions 4) Now calculate the minimum amount of test cases required to exercise all of the decisions.