Submit Search
Upload
Worksheet a
•
0 likes
•
517 views
A
Alain Nazzal
Follow
questions for QA testing / ISTQB/ QA / tester/ certificate preperaation
Read less
Read more
Internet
Report
Share
Report
Share
1 of 13
Download now
Download to read offline
Recommended
Dynamic Testing
Dynamic Testing
Hoang Nguyen
Lecture 1 introduction to complex trauma
Lecture 1 introduction to complex trauma
Newham College University Centre Stratford Newham
Sample motion for cost of proof sanctions in California
Sample motion for cost of proof sanctions in California
LegalDocsPro
Sample motion to vacate default under Rule 55(c) in United States District Court
Sample motion to vacate default under Rule 55(c) in United States District Court
LegalDocsPro
Medical Billing Flow Chart
Medical Billing Flow Chart
Karna *
Topic 5 chapter 1
Topic 5 chapter 1
TestingGeeks
Sample california demurrer to fraud complaint
Sample california demurrer to fraud complaint
LegalDocsPro
Medical billing charge entry process
Medical billing charge entry process
Richard Smith
Recommended
Dynamic Testing
Dynamic Testing
Hoang Nguyen
Lecture 1 introduction to complex trauma
Lecture 1 introduction to complex trauma
Newham College University Centre Stratford Newham
Sample motion for cost of proof sanctions in California
Sample motion for cost of proof sanctions in California
LegalDocsPro
Sample motion to vacate default under Rule 55(c) in United States District Court
Sample motion to vacate default under Rule 55(c) in United States District Court
LegalDocsPro
Medical Billing Flow Chart
Medical Billing Flow Chart
Karna *
Topic 5 chapter 1
Topic 5 chapter 1
TestingGeeks
Sample california demurrer to fraud complaint
Sample california demurrer to fraud complaint
LegalDocsPro
Medical billing charge entry process
Medical billing charge entry process
Richard Smith
Motivational Interviewing lecture
Motivational Interviewing lecture
Sovann Pen
Denial Management - Medical billing
Denial Management - Medical billing
Leanmedicalbilling
Sample California demurrer to complaint for breach of contract
Sample California demurrer to complaint for breach of contract
LegalDocsPro
self affirmation presentation.pptx
self affirmation presentation.pptx
Kavitha Krishnan
Types of Software Testing
Types of Software Testing
Nishant Worah
H A C K I N Gjk,K
H A C K I N Gjk,K
Hudzaifah Hud Azman
Medical Billing 101
Medical Billing 101
Alexander John Lau
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 presentation
Leanmedicalbilling
Sample demurrer for another action pending in California
Sample demurrer for another action pending in California
LegalDocsPro
Sample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatories
LegalDocsPro
Software testing
Software testing
Madhumita Chatterjee
powerpoint template for testing training
powerpoint template for testing training
John Roddy
Ar scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and asked
Jvs Prasad
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?
JamRivera1
Topic 5 chapter 7
Topic 5 chapter 7
TestingGeeks
Social Engineering
Social Engineering
primeteacher32
Nbp notice to buyer to perform - 410
Nbp notice to buyer to perform - 410
cdukelow
Lecture 4 phase 1 safety & stabilization
Lecture 4 phase 1 safety & stabilization
Newham College University Centre Stratford Newham
Iseb question from book
Iseb question from book
Natalia Iurii
Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019
DerrickDNealon
More Related Content
What's hot
Motivational Interviewing lecture
Motivational Interviewing lecture
Sovann Pen
Denial Management - Medical billing
Denial Management - Medical billing
Leanmedicalbilling
Sample California demurrer to complaint for breach of contract
Sample California demurrer to complaint for breach of contract
LegalDocsPro
self affirmation presentation.pptx
self affirmation presentation.pptx
Kavitha Krishnan
Types of Software Testing
Types of Software Testing
Nishant Worah
H A C K I N Gjk,K
H A C K I N Gjk,K
Hudzaifah Hud Azman
Medical Billing 101
Medical Billing 101
Alexander John Lau
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 presentation
Leanmedicalbilling
Sample demurrer for another action pending in California
Sample demurrer for another action pending in California
LegalDocsPro
Sample California motion to compel further responses to special interrogatories
Sample California motion to compel further responses to special interrogatories
LegalDocsPro
Software testing
Software testing
Madhumita Chatterjee
powerpoint template for testing training
powerpoint template for testing training
John Roddy
Ar scenarios with all the points to be verified and asked
Ar scenarios with all the points to be verified and asked
Jvs Prasad
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?
JamRivera1
Topic 5 chapter 7
Topic 5 chapter 7
TestingGeeks
Social Engineering
Social Engineering
primeteacher32
Nbp notice to buyer to perform - 410
Nbp notice to buyer to perform - 410
cdukelow
Lecture 4 phase 1 safety & stabilization
Lecture 4 phase 1 safety & stabilization
Newham College University Centre Stratford Newham
What's hot
(20)
Motivational Interviewing lecture
Motivational Interviewing lecture
Denial Management - Medical billing
Denial Management - Medical billing
Sample California demurrer to complaint for breach of contract
Sample California demurrer to complaint for breach of contract
self affirmation presentation.pptx
self affirmation presentation.pptx
Types of Software Testing
Types of Software Testing
H A C K I N Gjk,K
H A C K I N Gjk,K
Medical 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...
Denial management presentation
Denial management presentation
Sample 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 interrogatories
Software testing
Software testing
powerpoint 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 asked
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?
Topic 5 chapter 7
Topic 5 chapter 7
Social Engineering
Social Engineering
Nbp notice to buyer to perform - 410
Nbp notice to buyer to perform - 410
Lecture 4 phase 1 safety & stabilization
Lecture 4 phase 1 safety & stabilization
Similar to Worksheet a
Iseb question from book
Iseb question from book
Natalia Iurii
Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019
DerrickDNealon
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4
onsoftwaretest
St0 155 question answers
St0 155 question answers
MarcoMCervantes
Information security foundation based on iso iec 27002
Information security foundation based on iso iec 27002
Ajay Kumar Gupta
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-2011
Helen Nguyễn
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
Akash gupta
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
TestingGeeks
Quiz3 tonghop
Quiz3 tonghop
Daewoo Han
Assessment – SITXOHS003BStudent name ____________________________.docx
Assessment – SITXOHS003BStudent name ____________________________.docx
fredharris32
Unlocking Success A Comprehensive Guide to the CORe Certification Exam
Unlocking Success A Comprehensive Guide to the CORe Certification Exam
Aliza Oscar
Stop multiplying by 4 nyphp
Stop multiplying by 4 nyphp
Chuck Reeves
MATH 302 Final Exam
MATH 302 Final Exam
DafnaHabrew
BUSI 620 Inspiring Innovation/tutorialrank.com
BUSI 620 Inspiring Innovation/tutorialrank.com
jonhson108
15 Free PMP Exam Questions
15 Free PMP Exam Questions
OSP International LLC
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
InstructionDue Date 6 pm on October 28 (Wed)Part IProbability a.docx
dirkrplav
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
Take Test Quiz - Chapter 10, 11, and 12 ContentTop of FormA.docx
deanmtaylor1545
Findings, Conclusions, & RecommendationsReport Writing
Findings, Conclusions, & RecommendationsReport Writing
ShainaBoling829
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
jack60216
Similar to Worksheet a
(20)
Iseb question from book
Iseb question from book
Pass ASIS CPP Exam Questions 2019
Pass ASIS CPP Exam Questions 2019
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4
St0 155 question answers
St0 155 question answers
Information 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...
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
500 istqb-sample-papers-2010-2011
Quiz3 tonghop
Quiz3 tonghop
Assessment – 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 Exam
Stop multiplying by 4 nyphp
Stop multiplying by 4 nyphp
MATH 302 Final Exam
MATH 302 Final Exam
BUSI 620 Inspiring Innovation/tutorialrank.com
BUSI 620 Inspiring Innovation/tutorialrank.com
15 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.docx
Take 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 Writing
ECO 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...
sonatiwari757
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
APNIC
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 Service
Delhi Call girls
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
ruhi
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
stephieert
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Damian Radcliffe
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).pptx
ellan12
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
stephieert
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
dollysharma2066
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 Girl
aditipandeya
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
stephieert
𓀤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: 8448380779
Delhi Call girls
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🔝
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...
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...
Networking 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🔝
Enjoy 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 👌 ⏭️ 6378878445
Radiant 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 providers
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).pptx
Delhi 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 girls
FULL 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🔝
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 Girl
10.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...
Best 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 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...
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.
Download now