Consider the following pseudo code:1 Begin2 Read Time3 If Time < 12 Then4 Print(Time, "am")5 Endif6 If Time > 12 Then7 Print(Time -12, "pm")8 Endif9 If Time = 12 Then10 Print (Time, "noon")11 Endif12 EndIf the test cases Time = 11 and Time = 15 were input, what level of decision coverage would be achieved?
Answer(s): D
Test case 1 exercises the decision outcomes True, False, False Test case 2 exercises the decision outcomes False, True, False This leaves the True outcome of decision 3 not exercised. Of the 6 possible decision outcomes, 5 have been exercised, so the decision coverage is 5/6 (about 83%).
A software component has the code shown below:Program BiggestA,Biggest: IntegerBeginRead ABiggest = 10While A > 0DoIf A > BiggestThen Biggest = AEndifRead AEnddoEndThe component has exit criteria for component testing that include 100% statement coverage. Which of the following test cases will satisfy this criterion?
Given the Following program IF X <>= ZTHEN Statement 2;ENDMcCabe's Cyclomatic Complexity is :
Answer(s): B
An input field takes the year of birth between 1900 and 2004. The boundary values for testing this field are:
Answer(s): C
Code Coverage is used as a measure of what?
Post your Comments and Discuss ITIL ISEB-SWT2 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the ISEB-SWT2 content, but please register or login to continue.