CS3347 Software Engineering Principles & Practice Software Testing Semester B 2021/22
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
CS3347 Software Engineering Principles & Practice
Semester B 2021/22
1 . Software verification & validation process .
a . What is Software Verification?
b . What is Software Validation?
3 . What are thefour types of testing in the Software Testing process?
4 . White box testing .
Consider the following code segment,
a . draw the flow graph
b . compute the cyclomatic complexity of the graph
c . identify all independent paths based on the basis path testing
d . derive the test cases from each of the independent paths; show clearly the input and expected output
unsigned int a, b, tmp, gcd;
cin >> a >> b;
if (a == 0)
gcd = b;
tmp = b;
gcd = a;
while (tmp != 0)
if (gcd > tmp)
gcd = gcd – tmp;
tmp = tmp – gcd;
cout << " GCD = " << gcd << endl;
5 . Black box testing .
A function string TrainFare(int age)takes in an age and returns the type of fare to be paid . The train fare to be paid depends on the age of the passenger . For passengers below 12 and at 65 or above, they pay "concessionaryfare" and children below 3 arefree . All others pay "regular" fare . Use equivalence partitioning to
a . define appropriate classes of test cases
b . derive at least 1 test case for each class of a .; show the input and expected output;
c . apply boundary value analysis to derive the test cases