Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

ISTQB CTAL-TTA Exam - Topic 1 Question 5 Discussion

Posted by Bernardine on Mar 04, 2024 at 10:17 PM

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

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.


Get Premium CTAL-TTA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
22 comments · newest first
GE
Gerald 10 months ago
I agree, more tests are definitely needed for full coverage!
JA
Jaclyn 11 months ago
Wait, are we sure Test 2 is enough? Seems like we might miss something.
MA
Marva 11 months ago
Option A seems right, we need both tests listed there.
ED
Edna 11 months ago
I think we need at least one more test to hit all statements.
BO
Bok 11 months ago
Test 1 and Test 2 cover some cases, but not all.
LA
Lavonna 12 months ago
I’m leaning towards option D, but I’m not completely confident. It seems like we might have covered everything already with the two tests given.
JA
Janet 12 months ago
I feel like Test 1 and Test 2 are pretty solid, but I can't shake the feeling that we might need one more test case to cover all scenarios.
GE
Germaine 12 months ago
I think we had a similar practice question where we had to identify missing test cases. If I recall correctly, we might need a test for when A is less than B.
CR
Crista 1 year ago
I remember we discussed statement coverage in class, but I'm not entirely sure if the current tests cover all branches.
CH
Charlette 1 year ago
Yep, I agree with Emily. Those two additional test cases should do the trick. Time to put pen to paper and get this exam question solved!
JE
Jeanice 1 year ago
I think I've got it! The additional tests needed are A=6, B=12 (expected output: Bingo!) and A=7, B=9 (expected output: 7). That should give me 100% statement coverage with the minimum number of tests.
RO
Roselle 1 year ago
I'm a bit confused by the expected outputs. The "Bingo!" output doesn't seem to be covered by the given tests. I'll need to double-check the logic and make sure I understand it fully.
MA
Marion 1 year ago
Hmm, this looks like a tricky one. I'll need to carefully analyze the pseudo-code and the given tests to figure out what additional tests are needed.
CA
Cathrine 1 year ago
Okay, let me think this through step-by-step. The pseudo-code has an if-else statement, so I'll need to cover both the true and false conditions to achieve 100% statement coverage.
IN
Inocencia 1 year ago
I'm not sure about the encryption algorithm, but the other options seem straightforward. I'll mark the ones I'm unsure about and come back to them if I have time.
TI
Timothy 1 year ago
I remember something about needing to specify the "xsd" prefix for XML Schemas, but I can't recall the exact syntax.
DE
Deangelo 1 year ago
Okay, let me think this through. We need to replace the bicycle inspection forms, and the solution should involve Dynamics 365 Field Service and potentially some kind of app or flow to assist the technicians. I think A and B are the best options here, as they both seem to meet those requirements.
IS
Isidra 2 years 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.
CH
Chanel 2 years ago
But option B does not cover all the cases mentioned in the question. We might need to consider option A instead.
RU
Ruby 2 years ago
I disagree. Option B seems simpler and also covers the cases. I think we should go with that.
KR
Kristine 2 years ago
I agree with Chanel. Option A covers both cases and can help achieve 100% statement coverage.
CH
Chanel 2 years ago
I think we should consider option A for additional test cases.
0/2000 characters

Save Cancel