GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Testing  >  Whitebox Testing
Go To First  |  Previous Question  |  Next Question 
 Whitebox Testing  |  Question 44 of 46    Print  
How to calculate Branch and statement coverage for these?
Switch PC on
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook

a) 1 test for statement coverage, 1 for branch coverage
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage. 3 for branch coverage
d) 2 tests for statement coverage, 2 for branch coverage
e) 2 tests for statement coverage, 3 for branch coverage

IF A > B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D Then
Print “Error”
ENDIF

a) 1 test for statement coverage, 3 for branch coverage
b) 2 tests for statement coverage, 2 for branch coverage
c) 2 tests for statement coverage. 3 for branch coverage
d) 3 tests for statement coverage, 3 for branch coverage
e) 3 tests for statement coverage, 2 for branch coverage




  
Total Answers and Comments: 6 Last Update: September 07, 2009     Asked by: hereforquestions 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Ashwini Upadhye
 

For the 1st ex-

1 Statement Coverage, 1 for Branch Coverage

For the 2nd-

2 Statement Coverage, 3for Branch Coverage

is this correct?



Above answer was rated as good by the following members:
chennaj, bhavikt21
October 10, 2008 01:55:48   #1  
gary.garg Member Since: October 2008   Contribution: 1    

RE: How to calculate Branch and statement coverage for these?

Branch Coverage : 3 Statement Coverage : 2


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 14, 2008 11:03:53   #2  
manjili Member Since: October 2008   Contribution: 1    

How to calculate Branch and statement coverage for these?
IF A > B THEN
C A – B
ELSE
C A + B
ENDIF
Read D
IF C D Then
Print “Error”
ENDIF

a) 1 test for statement coverage 3 for branch coverage
b) 2 tests for statement coverage 2 for branch coverage
c) 2 tests for statement coverage. 3 for branch coverage
d) 3 tests for statement coverage 3 for branch coverage
e) 3 tests for statement coverage 2 for branch coverage


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 15, 2008 01:45:07   #3  
Ashwini Upadhye Member Since: October 2008   Contribution: 1    

RE: How to calculate Branch and statement coverage for these?

For the 1st ex-

1 Statement Coverage 1 for Branch Coverage

For the 2nd-

2 Statement Coverage 3for Branch Coverage

is this correct?


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 2Overall Rating: -1    
July 02, 2009 05:41:16   #4  
maguschen Member Since: July 2009   Contribution: 2    

RE: How to calculate Branch and statement coverage for these?

Question first:
b) 1 test for statement coverage 2 for branch coverage

a) Outlook appears True fulfill the statement coverage
b) Outlook appears
True and outlook appears False fulfill the branch coverage

Question second:
b) 2 tests for statement coverage 2 for branch coverage

Test data should be:
a) A>B C D
b) A


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 29, 2009 03:17:17   #5  
msuresh17 Member Since: December 2008   Contribution: 1    

RE: How to calculate Branch and statement coverage for these?
For both questions b is the answer .
 
Is this answer useful? Yes | No
September 07, 2009 01:50:13   #6  
gchaganti Member Since: September 2009   Contribution: 1    

RE: How to calculate Branch and statement coverage for these?
For First Question

a) 1 test for statement coverage 1 for branch coverage.



For Second Question

c) 2 tests for statement coverage. 3 for branch coverage.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape