You are on page 1of 3

Chapter 7:Grapg coverage

Essay

1-Mention what the different types of test coverage techniques are?


Different types of test coverage techniques include

 Statement Coverage: It verifies that each line of source code has been
executed and tested
 Decision Coverage: It ensures that every decision in the source code
is executed and tested
 Path Coverage: It ensures that every possible route through a given
part of the code is executed and tested

2- what is the Node and Edge Coverage?

 Node coverage: Execute every statement


 Edge coverage: Execute every branch
 Edge coverage is slightly stronger than node coverage

3-what is the Prime Path Coverage?

A simple, elegant and finite criterion that requires loops to be executed as well as
skipped

MCQ
1-How many test cases are necessary to cover all the possible
sequences of the statements(paths) for the Following program ?
Assume that two conditions are independent of each other

If(condition1)

Then statement 1

Else statement 2
If(condition2)

Then statement 3

a) 1 test Cases
b) 4 test Cases
c) 2 test Cases
d) 3 test Cases

2-Which of the following Statements is Not correct?

a) A minimal test set that achieves 100% statement coverage will generally detect
more faults than one that achieves 100% branch coverage
b) A minimal test set that achieves 100% path coverage will also achieve 100%
statement coverage
c) A minimal test set that achieves 100% LCSAJ coverage will also achieve 100%
branch coverage
d) A minimal test set that achieves 100% path coverage will generally detect more
faults than one that achieve 100% statement coverage

3- Given the following code, which statement is true about the


minimum number of test cases required for full statement and branch
coverage?
Read p

Read q

IF p+q> 100

THEN Print “Large”

ENDIF

IF p > 50

THEN Print “p Large”

ENDIF

a) 1 test for statement coverage, 2 for branch coverage


b) 2 test for statement coverage, 2 for branch coverage
c) 3 test for statement coverage, 1 for branch coverage
d) 1 test for statement coverage, 1 for branch coverage

True or False

(
1-Test Criterion are the Rules that define test requirements True )
2-Structural Coverage Criteria Requires a graph to be annotated with
references to variables(False)

3-Node coverage executes every branch(False)

You might also like