In this lecture we are going to start with example one of boundary value analysis.
So let's start with the example.
A program validates a numeric field as follows values less than 10 are rejected.
So 10 is not rejected less than 10.
That means nine is the director then is accepted values between 10 and 21 are accepted values greater
than or equal to 22 are rejected.
So now 22 is rejected.
21 is selected.
Which of the following covers the most boundary values.
So now we have these options and out of which we have to find out which one is covering the most boundary
values.
So in order to analyze the options first we have to draw a diagram based on the question.
So here we know that 10 and 21 are the boundaries.
So when you draw you will get a diagram like this 10 and 21 and the thing that you have to remember
is 10 is also a valid value twenty one is also a valid value a value less than ten is invalid and the
value more than 21 is invalid.
So now let's use this diagram and analyze the options.
So this is value.
This is in value.
And this is in value.
And these are your boundaries so he'll these other options.
And this is what we have done previously and now we will try to analyze the option against the diagram.
So first we will start with option A.
This is option.
The first value is name 9 will come here then is the 10 to 10 will come.
Next is eleven so 11 will come after 10.
So here and then is 22.
So 22 will come after 21.
So somewhere here.
So this is 22.
Now if you analyse Option A for this side of the boundary for the left side nine is invalid then is
valid.
So we have covered but when we come to the right side only 22 is there.
So invalid is there but value it is not your so that's the reason we cannot select option is our answer.
So we will move to Option B no so the first number is 10 here.
So 10 years on the line like this here then comes the eleven so eleven will come after 10.
So here next one is 20.
So 20 will come before 21.
So somewhere here and next one is 21 no if you see this option then is a valid value eleven is also
the added value twenty is also valid value twenty one is also a valid value.
So all are valid values so we are not taking the boundary so that is why B is also not your answer.
Now we move to Option C so the first number in options is 10.
So this is 10.
The next one is 11.
So this is 11.
Then comes 21.
This is 21 year and last value is 22.
So nobody will come here.
If you analyse this option then is valued.
Levin is also valued.
So here we are not taking in value.
If you come to the right hand side 21 is valued.
Twenty two is invalid.
So this is correct but this one is not correct.
And that is why we have to now analyze option B.
So when you see Option D the first option is 9 you 9 will come here then it's 10 to 10 will come here
then comes 21 to 21 will be on the line and last one is 22.
So this is 22 you know if you analyze this nine is invalid then is valid 21 is valid twenty two is invalid.
So at the boundary we are covering invalid and valid and other boundary also we are covering invalid
invalid and that is the reason we have to select option D as our answer so this.
I'm ending this lecture and I will see you with the next one until then happy to see.