DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CSA3703 - SOFTWARE TESTING
CLASS TEST – 2
Question 1: Test Design Strategies (10 Marks)
a. Explain the importance of selecting an appropriate test design strategy in software testing.
b. Differentiate between specification-based (black-box) and structure-based (white-box)
strategies with suitable examples.
c. Discuss any two real-world scenarios where black-box and white-box strategies can be
effectively applied.
Question 2: Equivalence Class Partitioning and Boundary Value Analysis (10 Marks)
A password field in a banking application accepts 6 to 12 alphanumeric characters.
a. Create equivalence partitions for valid and invalid inputs.
b. Apply boundary value analysis and list all boundary test cases.
c. Explain why these techniques help reduce the number of test cases without compromising
test coverage.
Question 3: White-box Testing Techniques (10 Marks)
Consider the following code segment:
if (A > 10):
if (B < 5):
print("Condition 1")
else:
print("Condition 2")
else:
if (C == 0):
print("Condition 3")
else:
print("Condition 4")
a. Draw the Control Flow Graph (CFG) for the above code.
b. Identify all independent paths.
c. Calculate path coverage if 3 out of 4 paths are tested.
d. Explain test adequacy criteria in this context.
Question 4: Evaluating Test Adequacy Criteria (10 Marks)
a. Define test adequacy criteria with examples.
b. How does code coverage and path coverage contribute to evaluating test adequacy?
c. Discuss challenges in achieving 100% coverage in large systems.
d. Suggest techniques to improve test adequacy in real-world software projects.