The complexity of testing
Using the following example we can explain why testing is so complicated.
You have a screen that contains one field only, named "username". The properties of the field are:
The field can contain only 6 alpha numeric characters and you have a keyboard with only alpha numeric keys.
The field is case sensitive.
Q: How many tests can you make in order to say that the screen is 100% bug free? Take a minute or two to answer this to yourself before you continue reading.
Well, the answer will be 56,800,235,586 (56 billion tests). Now, lets try to explain the answer:
The field contains:
6 places
The keyboard contains:
26 lower case chars
26 upper case chars
10 digits
We have 62 options for each place (the sum of keyboard options: 26 lower case chars + 26 upper case chars + 10 digits). But we have 6 places in the field so for each field we have 62 options and that means that the number of tests is:
62*62*62*62*62*62=62^6 = 56,800,235,584
Yes, this is the correct number of tests we need to perform in order to have 100% bugs free.
But we need to add 2 more tests:
one test is not to insert any value to the field.
the second test is to insert 7 chars to the field.
So the total number of tests is: 56,800,235,586.
If we will do 500 tests a day it will take us 311,234 years (if we will not jump from the window before).
No comments:
Post a Comment