CSCI926 Final Exam Autumn 2022
CSCI926 Final Exam Autumn 2022
Student to complete:
Family name
Other names
Student number
CSCI926
Software Testing and Analysis
South Western Sydney and Wollongong
Examination Paper
Autumn 2022
Weighting 55 %
Submit your work in one single file (PDF or Word) to the Exam
Submission site provided on Moodle.
To draw diagrams, you can use any tool of your choice (or draw
by hand and take pictures – make sure the pictures are all
clear). However, you need to insert the diagrams back into the
submission file.
2) Define a test obligation for program prog above, and a test suite which satisfies
this test obligation.
(3 marks)
3) Assume that the context is testing self-driving cars. For each of the FOUR
dependability qualities discussed in this subject, provide an example to explain its
meaning and the relation among those dependability qualities in this specific
context. Your examples must be specific to this case study. Generic answers will
receive 0 marks.
(6 marks)
Consider the system testing of an online shopping system. Design test case
specifications using the category-partition method as follows:
a) Identify an independently testable feature.
b) Identify at least 3 parameters/environment elements; for each parameter or
environment element, identify at least 3 categories.
c) For each category, identify at least 2 choices (that is, classes of values).
d) Introduce at least 1 error constraint, 1 property constraint and 1 single
constraint.
e) Give complete test case specifications.
Demonstrate how symbolic execution is applied for the following program. Identify
feasible and infeasible paths. For each feasible path, provide a representative test
case.
if (a == 0.0) {
return;
}
double denom = a;
a = b/denom;
double v = a + b + c;
if (v < 0.0) {
System.out.prinltn(“Three unequal real roots.”
if (denom == 0.0) {
System.out.println(“Invalid”);
}
else {
System.out.println(“Valid”);
}
}
else if (v > 0.0){
System.out.prinltn(“One real root.”);
}
else {
System.out.println("At least two equal.”);
Question 4 (6 marks)
m = 20;
k = 2;
i = b + a;
j = d;
k = k + 5;
if (j > i + 5){
k = j + i;
}
return;
}
Design a minimal set of test cases for the function simple() in Question 4. Your test
suite must meet the loop boundary adequacy criterion and branch coverage criterion
(note: give test cases rather than test case specifications).
Which of the two criteria subsume the other? Explain your answer.
Question 6 (6 marks)
Consider the finite state machine which models a sound recording software as
below.
off
record rewind
play stop
off
off off
2) Derive another test suite that satisfies the state-pair coverage criterion.
** End of Examination **