[ACCEPTED]-Equivalence Class Testing vs. Boundary Value Testing-black-box
Equivalence Class Testing
EC Testing is when you have a number of 73 test items (e.g. values) that you want to 72 test but because of cost (time/money) you 71 do not have time to test them all. Therefore 70 you group the test item into class where 69 all items in each class are suppose to behave 68 exactly the same. The theory is that you 67 only need to test one of each item to make 66 sure the system works.
Example 1
Children under 2 65 ride the bus for free. Young people pay 64 $10, Adults $15 and Senior Citizen pay $5.
Classes:
Price:0 63 -> Age:0-1
Price:10 -> Age:2-14
Price:15 62 -> Age:15-64
Price:5 -> Age:65-infinity 61
Example 2 (more than one parameter)
Cellphones K80, J64 and J54 run Java 5. K90 60 and J99 run Java 6. But there are two possible 59 browsers FireFox and Opera, J models run 58 FF and K models run O.
Classes:
Browser:FF, Java:5 57 -> Phones:J64,J54
Browser:FF, Java:6 -> Phones:J99
Browser:O, Java:5 56 -> Phones:K80
Browser:O, Java:6 -> Phones:K90
Dangers Of Equivalence Class Testing 55
There is a danger of using EC Testing that 54 is rarely mentioned in the testing books 53 but is very important to remember.
Just because two items/values are suppose to be in the same class and behave the same, does not mean they DO behave the same.
That 52 means that just because you test one value 51 in the class that ALL values in the class 50 behave the same. Real world example of mine 49 is with cell phones that all had a certain 48 Java Platform. They were suppose to all 47 work the same but they didn't in reality. So 46 testing just one value in a class is good, but 45 not good enough. EC Testing is a good tool, but 44 it's not fool proof and be careful with 43 it. If test cases are cheap and fast (like 42 automation), test more, or why not test 41 them all!
Boundary Value Testing
BV Testing is when you decide 40 to test the values on the edge of each Class 39 you have identified. The theory is that 38 most defects is around the edges of a class.
Example
Classes:
Price:0 37 -> Age:0-1 ( Boundary values 0, 1)
Price:10 36 -> Age:2-14 ( Boundary values 2, 14)
Price:15 35 -> Age:15-64 ( Boundary values 15, 64)
Price:5 34 -> Age:65-infinity ( Boundary values 65)
Critique of Boundary Value Testing
1) I, and 33 other test professionals I have taken courses 32 from, are not convinced that most defects 31 are hidden around the edges of each class. And 30 I have never seen any studies that proves 29 this to be the case.
2) The fact that you 28 need to use BV Testing proves that EC Testing 27 is flawed since you test more than one value 26 of each class.
3) It's easy to use when 25 using values like integers. But what is 24 a boundary value of class of phones models 23 or browsers versions?
Hidden Boundary Value Testing
The boundary values 22 of a class is often based on the specification 21 of how the system should work. This is all 20 good and well but most systems contain boundaries 19 that are not explained in any spec and you 18 will need to look for yourself. E.g. 'How 17 many characters can I put into the test 16 field before the system fails and breaks.','How 15 big can the data file become before it so 14 slow to read it gets annoying'.
Real world examples
- Pasting 13 one million characters into a text area 12 in FireFox 3.5 on win 7 crashes it
- ReCaptcha 11 has a limit of 16003 characters, does your 10 system handle the 413 that it passes back 9 to it if somebody puts 16004+ characters 8 in field. Or does it break
Summary
EC Testing and 7 BV Testing are great tools and you should 6 use them but they are not perfect and don't 5 expect to find all defects using them. Use 4 your know-how about the system and your 3 intelligence and intuition to try more items 2 and looks for other ways it could fail. And 1 look for the hidden boundaries!
Boundary value analysis simply means to 11 select values near the boundaries of the 10 classes. So you are still dividing the input 9 domain according to the classes then instead 8 of selecting values from the middle of the 7 class use values from the boundaries.
For 6 example, if the input condition is a range 5 from 20 to 70 then you have three classes 4 of input
- less than 20
- between 20 and 70
- more than 70
then for boundary value analysis 3 select input = 19, 20, 21, 69, 70, 71. This 2 type of analysis picks up errors on the 1 boundaries.
The Equivalence testing needs to be supplemented 15 with the Boundary value testing.
For example 14 for equivalent testing of a function that 13 takes values between 1 and 12
(say months 12 of a year) the partitions would be:
For 11 equivalence testing it is enough to pick 10 one value as test input from each of these 9 partition classes. That would mean tests 8 with value of -2,6, and 15 would be considered 7 enough to test behavior of the function. But 6 these values doesn't catch Off-by-one error which can occur 5 quite often.
With the boundary value testing 4 the test inputs would be : -1,0,1,11,12,13 3 (at the boundaries), which would catch off-by-one 2 errors.
I see both these testing methods 1 to be a complement of each other.
Boundary value analysis is part or subset 3 of equivalence partitioning. In boundary 2 values analysis, instead of some random 1 value, only values in the boundary are selected.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.