2

NAME: ________________________

------------------- CEN 4072/6070 Software Testing & Verification -------------------

Exam 1 -- Fall 2005

You have 90 minutes to work on this exam. It is a "closed-book/closed-notes" test. Pay attention to point values, since you may not have time to work all the problems.

PRINT your name above NOW and sign the pledge at the bottom of the last page, if appropriate, when you are finished. There are 21 problems. PLEASE PRINT ANSWERS IN THE SPACE PROVIDED ONLY. Good luck!

1. Boris Beizer suggests that testing involves designing and executing tests "to demonstrate the correspondence between an element and its specification."

a. (2 pts.) Briefly contrast this perspective with that of Glenford Myers, as reflected in "The Psychology and Economics of Program Testing."

b. (2 pts.) Briefly describe Myers' rationale for advocating this contrary view.

2. (12 pts.) In "The six essentials of software testing," Edward Kit describes "the essentials of the software testing process that serve as the foundation" for his book, Software Testing in the Real World: Improving the Process. For each of the following "essentials", circle the missing word(s) actually used by Kit

a. Essential 1: The quality of the ___________ (tester; test plan; test process; test cases) determines the success of the test effort.

b. Essential 2: Prevent defect migration by using __________ (information hiding; early life-cycle testing techniques; regression testing; black-box testing) techniques.

c. Essential 3: The time for __________ (formal methods; continuous process improvement; software testing tools; tester training) is now.

d. Essential 4: A real person must take responsibility for ___________ (test planning; software quality; maintaining test cases; improving the testing process).

e. Essential 5: Testing is a professional discipline requiring ___________ (trained, skilled people; disciplined self-deprivation, a good sense of humor, good intuition).

f. Essential 6: Cultivate a positive team attitude of ___________ (goodwill toward man; creative destruction; invincibility; existential grandeur)

3. (3 pts.) The following diagram was used to illustrate a possible interpretation of what it means to say that a program's REQUIREMENTS are correct.

Provide the interpretation in words.

4. (9 pts.) Recall the program specification:

An ordered pair of numbers, (x, y), are input and a message is output stating whether they are in ascending order, descending order, or equal. If the input is other than an ordered pair of numbers, an error message is output.

and associated equivalence classes:

{ (x, y) | x<y } (V)

{ (x, y) | x>y } (V)

{ (x, y) | x=y } (V)

{ input is other than an ordered

pair of numbers } (I)

Indicate whether or not the underlying assumption of partition testing would

hold for each of the following program designs. (Circle "yes" or "no" as

appropriate for each.)

a. if (input is other than an ordered pair of numbers)

then output(“equal”)

else yes

if x<y then output(“ascending order”)

else no

if x>y then output(“descending order”)

else

output(“invalid input”)

b. if (input is other than an ordered pair of numbers)

then output(“invalid input”)

else yes

if x<y then output(“descending order”)

else no

if x>y then output(“increasing order”)

else

output(“equal”)

c. if (input is other than an ordered pair of numbers)

then output(“invalid input”)

else

if x<y and x<0 then

output(“descending order”)

else yes

if x<y and x >= 0 then

output(“descending order”)

else no

if x>y and x<0 then

output(“increasing order”)

else

if x>y and x >= 0 then

output(“increasing order”)

else

output(“equal”)

5. Consider the two Cause-Effect graphs shown below. How many test cases would be required to achieve AFCCV (All Feasible Combinations of Cause Values) coverage for each? (Hint: E=”at most one”; I=”at least one”; O=”one and only one”)

a. (3 pts.)

b. (3 pts.)

6. (10 pts.) Recall the Cause-Effect graph depicting error conditions for the Symbol Table Storage specification:

Identify all feasible combinations of connected Cause values that result

in Effect 33 being true. Enter a test case template for each combination

identified in the test case coverage matrix below. (Note: identify combinations

for Effect 33 ONLY.)

7. (6 pts.) Prove that Condition Coverage and Statement Coverage are independent.

8. (3 pts.) What point was the Quick Sort pseudocode program below used to illustrate in class? Be specific.

QSORT(X,N)

Return(X)

END

9. (6 pts.) List 3 potential advantages and 3 potential disadvantages of the bottom-up incremental integration strategy.

10. (3 pts.) Reliability tests utilize Statistical Testing based on an operational profile. What information is provided in an operational profile and why is it needed to predict reliability?

11. (3 pts.) Provide a control-flow graph for the pseudocode program below that is suitable for dataflow coverage analysis. The 7 nodes of your graph should correspond to the line numbers given in the pseudocode.

b. (15 pts.) Identify all c-uses and p-uses for variable Y. For each c-use or p-

use, identify (using the “ * ” notation, as in class) all feasible def-clear

paths. Indicate whether or not each feasible def-clear path is a du-path.

c. (4 pts.) Give the path condition for path <1,2,3,5,6,3,4,6,7> in terms of X

and Y input values. Show all terms and then simplify as appropriate. (Hint:

use “X1” to represent the first input value of X, “X2” to represent the second,

etc.)

d. (4 pts.) Give the path condition for path <1,2,3,4,6,3,5,6,7> in terms of X

and Y input values. Show all terms and then simplify as appropriate. (Hint:

use “X1” to represent the first input value of X, “X2” to represent the second,

etc.)

12. (3 pts.) Young and Pezze note that “unit testing” of object-oriented software normally focuses on object classes as opposed to individual methods. What rationale do they give for this?

13. (3 pts.) What are oracles? How does encapsulation make the construction of oracles potentially more difficult for object-oriented software?

14. (2 pts.) Briefly describe two of Gause & Weinberg’s suggestions for how to make meetings “safe”.

15. (3 pts.) Explain what Sauer, et al., mean by the statement, “The performance advantage of an interacting group is a function of the level of false positives discovered by individuals.” In particular, what “group” is being referred to and what is meant by “false positives”?

16. (3 pts.) Explain why recommendations both for and against “the use of inspection results in performance appraisals,” can be equally valid.

17. (4 pts.) What is regression testing? What two types of tools are required to automate regression testing?

18. (3 pts.) Briefly explain the connection between “killing mutants” and “test case sufficiency”.

19. (5 pts.) Using a number line representing the exact value of x**y, clearly identify the region(s) associated with underflow and overflow. (Hint: you will need to depict the locations of 0.0, +/-HUGE_VAL, and +/-TINY_VAL on your number line.)

20. (2 pts.) In black-box test case design, expected results come from the requirements specification. Where do expected results come from in white-box test case design?

21. (6 pts.) In non-error cases, the value returned by remainder(x,y), x-ny, depends on whether n is the FLOOR of x/y or n is the CEILING of x/y. What specific conditions, in terms of x and y, determine which value of n is used in computing remainder(x,y)?

On my honor, I have neither given nor received unauthorized aid on this exam.

______________________________

SIGNATURE