Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

ISTQB Exam CTAL-TTA Topic 1 Question 5 Discussion

Actual exam question for ISTQB's CTAL-TTA exam
Question #: 5
Topic #: 1
[All CTAL-TTA Questions]

Consider the pseudo code provided below:

Given the following tests, what additional test(s) (if any) would be needed in order to achieve 100% statement coverage, with the minimum number of tests?

Test 1: A = 7, B = 7, Expected output: 7

Test 2: A = 7, B = 5, Expected output: 5

Show Suggested Answer Hide Answer
Suggested Answer: D

100% statement coverage means that every line of code is executed at least once during testing. Based on the provided pseudo-code and the test cases given:

Test 1 executes the MIN = B statement when A and B are equal.

Test 2 executes the MIN = A statement and skips the inner IF since B is not equal to 2*A.

All statements within the code have been executed by these two tests, hence no additional test cases are needed to achieve 100% statement coverage.


Contribute your Thoughts:

Isidra
6 months ago
I think we should carefully analyze the test cases and choose the option that covers all scenarios. Option A seems like the better choice for achieving 100% statement coverage.
upvoted 0 times
...
Chanel
6 months ago
But option B does not cover all the cases mentioned in the question. We might need to consider option A instead.
upvoted 0 times
...
Ruby
6 months ago
I disagree. Option B seems simpler and also covers the cases. I think we should go with that.
upvoted 0 times
...
Kristine
7 months ago
I agree with Chanel. Option A covers both cases and can help achieve 100% statement coverage.
upvoted 0 times
...
Chanel
7 months ago
I think we should consider option A for additional test cases.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77