Page 1 of 2

ECE 322

SOFTWARE TESTING AND MAINTENANCE

Assignment #4

(return to the appropriate box- ECE 322 A1 – 2

nd floor of DICE building)

Total: 30 points

10 points

1. The behavior of a communication software system can be represented in the form of the finite

state machine shown below. The figure shows the corresponding transition probabilities between

the states.

A

C

B

D

E

1.0

0.6

0.4

0.3 1.0

0.5

0.5

Determine an order in which you would like to test individual states. Which transitions would you

like to test first? Justify your answer.

10 points

2. Consider the program P with 6 inputs A, B, C, D, E, F and 3 outputs X, Y, and Z. The input

variables assume some values shown in the table below.

A

X

P

B C D E F

Y Z

Page 2 of 2

input values

A 0, 1, 2, 3

B a, b, c, d, e

C 100, 200

D 7, 8, 9, 10, 11

E Y, N

F ,

Consider the input-output testing strategy. Consider the situation when (i) you do not know

functional dependencies among the input and output variables, and (ii) where these dependencies

are known (as shown in the figure below).

A

X

B C D E F

Y Z

What is the number of test cases required when using these two strategies. For (ii) propose a

collection of test cases. In this strategy, how could you minimize the number of test cases; show

an example.

10 points

3. Given are the following two control flow graphs

A

C

D

B

E

F

G

H

A

C

D

B

(a) (b)

How many test cases do you require to complete branch coverage? How do these numbers

compare with the cyclomatic complexity?