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 Exam ISTQB-CTFL Topic 2 Question 24 Discussion

Actual exam question for ISTQB's ISTQB-CTFL exam
Question #: 24
Topic #: 2
[All ISTQB-CTFL Questions]

A system has a self-diagnostics module that starts executing after the system is reset. The diagnostics are running 12 different tests on the systems memory hardware. The following is one of the requirements set for the diagnostics module:

'The time taking the diagnostics tests to execute shall be less than 2 seconds' Which of the following is a failure related to the specified requirement?

Show Suggested Answer Hide Answer
Suggested Answer: B

To achieve 100% statement coverage, we need to design test cases that ensure every statement in the given pseudo-code is executed at least once. Analyzing the pseudo-code, we notice that there are conditions based on two variables: Gender and Age. To cover all statements, we need to consider the paths that lead to each assignment of the Shoe Size variable.

Gender = Boy, Age <= 3 (Shoe Size assignment is not reached, but the condition is evaluated)

Gender = Boy, Age > 3 AND Age < 5 (Shoe Size = 1)

Gender = Boy, Age >= 5 AND Age < 7 (Shoe Size = 2)

Gender != Boy, Age <= 3 (Again, Shoe Size assignment is not reached, but the condition is evaluated)

Gender != Boy, Age > 3 AND Age < 5 (Shoe Size = 0)

Gender != Boy, Age >= 5 AND Age < 7 (Shoe Size = 1)

However, upon closer inspection, we see that tests 1 and 4 do not contribute to statement coverage as they do not lead to a Shoe Size assignment. Therefore, we only need 4 test cases to achieve 100% statement coverage, making option B the correct answer.


Contribute your Thoughts:

Eloisa
1 days ago
But what if the tests don't even start after a system reset? Wouldn't that also be a failure?
upvoted 0 times
...
Tyisha
4 days ago
I agree with Stephaine, if the tests take more than 2 seconds, it would be a failure.
upvoted 0 times
...
Theodora
7 days ago
B) The diagnostic tests take too much time to execute. This is clearly a failure related to the specified requirement of the tests taking less than 2 seconds to execute.
upvoted 0 times
...
Stephaine
13 days ago
I think the answer is B) The diagnostic tests take too much time to execute.
upvoted 0 times
...

Save Cancel