95.9k views
1 vote
A batch application has been in production unchanged for over two years. It runs overnight once a month to produce statements that will be e-mailed to customers. For each customer, the application goes through every account and lists every transaction on that account in the last month. It uses a nested-loop structure to process customers (outer loop), each customer's accounts (middle loop), and each account's transactions (inner loop).

One night, the batch application terminates prematurely, failing to e-mail statements to some customers, when it encounters a customer with one account for which no transactions occurred in the last month. This is a very unusual situation and has not occurred in the years since this application was placed in production.
While fixing the defect, a programmer asks you to recommend test techniques that are effective against this kind of defect. Which of the following test techniques would most likely have been able to detect the underlying defect?
A. Decision testing
B. Statement testing
C. Checklist-based testing
D. Error guessing

User Rakesh L
by
7.6k points

1 Answer

2 votes

Final answer:

Decision testing is the most effective test technique to detect the defect in the batch application, as it checks the application's logic channels, which in this case, failed to handle an account with no transactions.

Step-by-step explanation:

The test technique that would have been most effective in detecting the defect in the batch application is A. Decision testing. This technique involves testing the logic paths or decision points within the application code. Since the failure occurred due to an unusual scenario where a customer had an account with no transactions in the last month—a condition that the application's logic did not handle—decision testing would have involved checking the behavior of the application with various input conditions to ensure all decision paths in the nested-loop structure are working correctly. Other test techniques like statement testing, checklist-based testing, and error guessing have their uses, but decision testing is key for uncovering hidden logical errors that could lead to application failures. This kind of testing can also help identify any other potential corner cases that may not have been previously considered.

User Alex Bennett
by
7.7k points