December 1998
SE203: SOFTWARE ENGINEERING

QUESTION 5

Total Marks: 20 Marks

Click here to access other questions

Click to access
SUGGESTED SOLUTIONS
for Question 5

 

A variety of techniques exists for testing software.

 

(a) Use the basis path testing method to consider the following flow graph:

pic1.gif (4019 bytes)

 

(i) Identify the predicate nodes in this flow graph. [2]
(ii) Use three different methods to calculate the value of cyclomatic complexity, V(G). Indicate all working used to derive your answer for V(G). [3]
(iii) Based on your answer to (i), derive the basis set of test paths.

 

[2]
(b) (i) A project group has implemented a power match-making system to pair up potential unmarried males and females. In this program, one of the criteria used to match-make a male participant to a female participant is the person’s age. The variable AGE in this system has been declared as an integer data-type, and only participants from the ages of 22 to 45 are allowed to be match-made. Use the boundary value analysis testing method to propose six test cases that should be used in the testing of the AGE variable. [3]
(ii) Explain in your own words why this testing method is effective.

 

[2]
(c) In the same match-making program as described in part (b), the gender of each participant is differentiated through the use of the SEX data variable. This data variable is of the character type, with a length of one character. The possible values for the SEX data variable are M and F.
(i) Use the equivalence partitioning testing method to propose one valid and one invalid equivalence class of inputs. [2]
(ii) Propose one test-case each for the valid class and the invalid class.

 

[2]
(d) The two testing methods used in validation testing are Alpha and Beta testing. List two differences between Alpha and Beta testing. [4]