ASTQB ISTQB Foundation Level Exam Practice Test

Page: 1 / 14
Total 219 questions
Question 1

A tool that supports traceability, recording of incidents or scheduling of tests is called..?



Answer : D


Question 2

Given the Following program IF X <>= ZTHEN Statement 2;ENDMcCabe's Cyclomatic Complexity is :



Answer : B


Question 3

A software component has the code shown below:

Program BiggestA, Biggest: Integer Begin Read A Biggest = 10 While A > 0 Do If A > Biggest Then Biggest = A Endif Read A Enddo End

The component has exit criteria for component testing that include 100% statement coverage. Which of the following test cases will satisfy this criterion?



Answer : D


Question 4

Consider the following pseudo code:

1 Begin 2 Read Time 3 If Time < 12 Then 4 Print(Time, "am") 5 Endif 6 If Time > 12 Then 7 Print(Time 12, "pm") 8 Endif 9 If Time = 12 Then 10 Print (Time, "noon") 11 Endif 12 End

If the test cases Time = 11 and Time = 15 were input, what level of decision coverage would be achieved?



Answer : 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%).


Question 5

Consider the following pseudo code:

1 Begin 2 Read Time 3 If Time < 12 Then 4 Print(Time, "am") 5 Endif 6 If Time > 12 Then 7 Print(Time 12, "pm") 8 Endif 9 If Time = 12 Then 10 Print (Time, "noon") 11 Endif 12 End

How many test cases are needed to achieve 100 per cent decision coverage?



Answer : C

The three decisions are in sequence and the conditions are all mutually exclusive (if any one is true the others must be false). Hence a test case that makes the first decision true will make the second and third decisions false and so on.

So test case 1 (say Time = 6) would exercise the path True, False, False, test case 2 (say Time = 15) would exercise the path False, True, False. Test case 3 would have to be Time = 12. This combination achieves 100 per cent decision coverage because each decision has been exercised through its true and its false outcomes.


Question 6

A washing machine has three temperature bands for different kinds of fabrics: fragile fabrics are washed at temperatures between 15 and 30 degrees Celsius; normal fabrics are washed at temperatures between 31 and 60 degrees Celsius; heavily soiled and tough fabrics are washed at temperatures between 61 and 100 degrees Celsius.

Which of the following contains only values that are in different equivalence partitions?



Answer : C

Answer (A) includes two values from the lower partition, answer (B) contains two values from the second partition, answer (D) contains one value that is invalid (out of range).


Question 7

A system is designed to accept values of examination marks as follows:

Fail: 0--39 inclusive Pass: 40--59 inclusive Merit: 60--79 inclusive Distinction: 80--100 inclusive

In which of the following sets of values are all values in different equivalence partitions?



Answer : B


Page:    1 / 14   
Total 219 questions