ISTQB Problems on Equivalence Partitioning And Boundary Value Analysis

  Q 1:  In an Examination, a candidate has to score a minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks.  Identify Valid Equivalence values if the student clears the exam.

a) 22,23,26

b) 21,39,40

c) 29,30,31

d) 0,15,22


Solution:

The classes will be as follows:

Class I: values < 24   => invalid class

Class II: 24 to 40       => valid class

Class III: values > 40 => invalid class

We need to identify Valid Equivalence values. Valid Equivalence values will be there in a Valid Equivalence class. All the values should be in Class II.

The answer is ‘C’


Q 2:  One of the fields on a form contains a text box that accepts alphanumeric values. Identify the Valid Equivalence class.

a) BOOK

b) Book

c) Boo01k

d) Book


Solution:

Alphanumeric is a combination of alphabets and numbers. Hence we have to choose an option which has both of these. A valid equivalence class will consist of both alphabets and numbers. Option ‘c’ contains both alphabets and numbers.

The answer is ‘C’


Q 3:  One of the fields on a form contains a text box that accepts numeric values in the range of 18 to 25. Identify the invalid Equivalence class.

a) 17

b) 19

c) 24

d) 21

Solution:

The text box accepts numeric values in the range of 18 to 25 (18 and 25 are also part of the class). So this class becomes our valid class. But the question is to identify invalid equivalence classes. The classes will be as follows:

Class I: values < 18   => invalid class

Class II: 18 to 25       => valid class

Class III: values > 25 => invalid class


17 falls under an invalid class. 19, 24 and 21 fall under valid class.

The answer is ‘A’


Q 4:  The Switch is switched off once the temperature falls below 18 and then it is turned on when the temperature is more than 21. When the temperature is more than 21. Identify the Equivalence values which belong to the same class.

a) 12,16,22

b) 24,27,17

c) 22,23,24

d) 14,15,19

Solution:

We have to choose values from the same class (it can be a valid or invalid class). The classes will be as follows:


Class I: less than 18 (switch turned off)

Class II: 18 to 21

Class III: above 21 (switch turned on)


Only in Option “c”, all the values are from one class. Hence the answer is ‘C’. 

Q 5: A program validates numeric fields as follows: values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following covers the MOST boundary values?

a. 9,10,11,22

b. 9,10,21,22

c. 10,11,21,22

d. 10,11,20,21

Solution:

The boundaries can be identified as 9, 10, 21, and 22. 

The answer is ‘B’

Q 6:  A program validates numeric fields as follows: values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following input values cover all of the equivalence partitions?

a. 10,11,21

b. 3,20,21

c. 3,10,22

d. 10,21,22

Solution:

We have to select values that fall in all the equivalence classes (valid and invalid).

The classes will be as follows:

Class I: values <= 9   => invalid class

Class II: 10 to 21       => valid class

Class III: values >= 22 => invalid class


The answer is ‘C’.


Q 7: In a system designed to work out the taxes to be paid:

An employee has £4000 of salary tax-free.

The next £1500 is taxed at 10%.

The next £28000 after that is taxed at 22%.

Any further amount is taxed at 40%.


To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?

a) £4000; £5000; £5500

b) £32001; £34000; £36500

c) £28000; £28001; £32001

d) £4000; £4200; £5600


Solution:

The classes will be as follows:

Class I   : 0 to £4000          => no tax

Class II  : £4001 to £5500   => 10 % tax

Class III : £5501 to £33500 => 22 % tax

Class IV : £33501 and above => 40 % tax


Select the values that fall into three different equivalence classes. 

The answer is ‘D’.


Q 8: Given the following specifications, which of the following values for age are in the SAME equivalence partition?

If you are less than 18, you are too young to be insured.

Between 18 and 30 inclusive, you will receive a 20% discount.

Anyone over 30 is not eligible for a discount.


a) 17, 18, 19

b) 29, 30, 31

c) 18, 29, 30

d) 17, 29, 31

Solution:

The classes will be as follows:

Class I: age < 18       => not insured

Class II: age 18 to 30 => 20 % discount

Class III: age > 30     => no discount

Here, we cannot determine if the above classes are valid or invalid, as nothing is mentioned in the question. (But according to our guess we can say I and II are valid and III is invalid. But this is not required here.) We have to select values that are in the SAME equivalence partition. Values from option ‘c’ fall in the same partition.


The answer is ‘C’.

Q 9. ‘X’ has given a data on a person age, which should be between 1 to 99. Using BVA which is the appropriate one? 

A. 0,1,2,99

B. 1, 99, 100, 98

C. 0, 1, 99, 100

D. –1, 0, 1, 99

Solution:

The boundaries can be identified as 0, 1, 99, and 100

The answer is ‘C’.


Q 10: In a system designed to work out the taxes to be paid:

An employee has £4000 of salary tax-free.

The next £1500 is taxed at 10%.

The next £28000 after that is taxed at 22%.

Any further amount is taxed at 40%.


To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?


a) £28000

b) £33501

c) £32001

d) £1500

Solution:

We have to select a value which is a boundary value (start/end value). 33501 is a boundary value.

The answer is ‘B’.


THANKS

Comments

Popular posts from this blog

Python namespaces & LEGB rule in Python