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?
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.
Katy
3 months agoArlean
3 months agoStephaine
3 months agoHailey
4 months agoMarg
4 months agoBettina
4 months agoRutha
4 months agoHillary
4 months agoGracia
5 months agoClaribel
5 months agoNiesha
5 months agoTy
5 months agoClaribel
5 months agoWillodean
5 months agoHarley
5 months agoWillodean
5 months agoKallie
5 months agoJonelle
10 months agoDenny
10 months agoSylvia
8 months agoCherelle
8 months agoLuisa
8 months agoGail
10 months agoKrissy
9 months agoTeddy
9 months agoDominque
9 months agoMiles
10 months agoPolly
9 months agoJacquelyne
9 months agoEzekiel
10 months agoEloisa
10 months agoTyisha
10 months agoTheodora
11 months agoCarissa
10 months agoDiane
10 months agoBrice
10 months agoStephaine
11 months ago