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
6 months agoArlean
6 months agoStephaine
6 months agoHailey
7 months agoMarg
7 months agoBettina
7 months agoRutha
7 months agoHillary
7 months agoGracia
8 months agoClaribel
8 months agoNiesha
8 months agoTy
8 months agoClaribel
8 months agoWillodean
8 months agoHarley
8 months agoWillodean
8 months agoKallie
8 months agoJonelle
1 year agoDenny
1 year agoSylvia
11 months agoCherelle
11 months agoLuisa
11 months agoGail
1 year agoKrissy
12 months agoTeddy
12 months agoDominque
1 year agoMiles
1 year agoPolly
1 year agoJacquelyne
1 year agoEzekiel
1 year agoEloisa
1 year agoTyisha
1 year agoTheodora
1 year agoCarissa
1 year agoDiane
1 year agoBrice
1 year agoStephaine
1 year ago