BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

ISTQB CTAL-TTA Exam - Topic 1 Question 56 Discussion

Posted by Dana on Sep 30, 2026 at 05:00 AM

Consider the following section of pseudo code and associated test Input data:

If withdrawal-amount <= amount-on-deposit then Set authorize-transaction = true

Else

If withdrawal-amount <= S100 AND preferred-customer = true then Set authorize-transaction = true

Else

Set authorize-transaction = false

Endif

Endif

Input data set #1

withdrawal-amount = 160

amount-on-deposit = 100

preferred-customer = true

Input data set #2

withdrawal-amount = 500

amount-on-deposit = 500

preferred-customer = false

Input data set #3

withdrawal-amount = 50

amount-on-deposit = 500

preferred-customer = false

What would be the decision coverage achieved if each of these test input data sets were run once?

Suggested Answer: A

To achieve decision coverage, each branch of the decision structure in the code must be executed at least once. The code snippet has three branches:

withdrawal-amount <= amount-on-deposit

withdrawal-amount <= $100 AND preferred-customer = true

Default case where the transaction is not authorized

Data set #1 triggers the second branch because the withdrawal amount is not less than the amount on deposit, but it is less than $100, and the user is a preferred customer.

Data set #2 triggers the first branch where the withdrawal amount is equal to the amount on deposit.

Data set #3 tests the condition where the withdrawal amount is less than the deposit amount, but the user is not a preferred customer, triggering the default case.

All decision branches are covered by these test cases, achieving 100% decision coverage.


Get Premium CTAL-TTA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
12 comments · newest first
LA
Lacey 4 days ago
Wait, how does that add up to 50%?
GA
Gabriele 9 days ago
I think it's 50%. Seems right to me!
JO
Johana 14 days ago
The first input fails, second passes, third passes.
DO
Dominic 19 days ago
So, only one input set actually authorizes? Interesting!
DO
Dottie 24 days ago
Definitely not 100%, that's for sure.
EF
Effie 30 days ago
Wait, how can it be 50%? Seems off.
DA
Dallas 1 month ago
I think it's 50% coverage.
SO
Sol 1 month ago
The first input won't authorize, but the second one will.
TI
Tish 2 months ago
I feel like we might only cover a few branches, so maybe it’s closer to 50% or even 33%, but I need to double-check the logic.
WI
Willard 2 months ago
For input data set #1, the transaction is authorized, but for #2 and #3, I’m not sure if they both lead to the same outcome.
NI
Nieves 2 months ago
I remember a similar question where we had to calculate decision coverage, but I'm not sure if it's 100% here since not all paths might be taken.
JI
Jina 2 months ago
I think we need to analyze each input set carefully to see how many conditions are actually covered.
0/2000 characters

Save Cancel