The second technique that we have in black box testing is called boundary value analysis.
And this technique is considered as an extension of equivalence partitioning.
So it is equivalence partitioning but in a better way, it tests the boundaries of the system.
So in equivalence partitioning,
we said that we will test at any value inside the partition.
So let's say, our friend, the same friend who is going to study software testing.
He will begin studying at 5 PM, and he will finish studying at 7 PM
If I test at 6 PM, this is what equivalent partitioning says, we will take any value from the partition.
So if I test at 6 PM, what will happen? I might find him studying and this is a good thing and
I might find him not studying.
But what if my friend began studying at 5:30 and he finished studying at 6:30 .
OK.
So here in this case, did he finish
the studying session which is two hours?
No, he only studied for only one hour.
But when I went to check on him, I found him studying.
OK.
Because I came inside the partition.
OK.
So how can I make sure in a better way that he is really studying from the beginning of the session
until the end of the session?
In this case we use boundary value analysis.
So here I will test my system at the boundaries of it.
OK.
We begin at 5 and we finish at 7.
So I will test and 5 PM and 7 PM.
OK.
So in your opinion which technique is better equivalence partitioning or boundary value analysis?
Of course boundary value analysis, why?
Because this technique tests at the boundaries of the system, at the breaking points of the system.
The points that the developers most of the time tend to make mistakes in them.
For example if we say, X is greater than or equal to five [X>=5], if the developer forgets
this, and he writes X is greater than five [X>5], boundary value analysis will find this error.
will find this mistake and will report it, but equivalence partitioning will not find this mistake.
It will test at 7, 8, 9
anything other than 5.
So in boundary value analysis, we have two types.
We have something which is called two-value boundary value analysis.
And another thing that is called three-value boundary value analysis. Me personally,
I prefer three-value boundary value analysis, and it says, here we have 5 PM, We will test at 5 PM,
and also we will test at 5:01 PM.
And we will test at 4:59.
So here, at each boundary, we take three values, so this is the boundary, I will test at the boundary
and at the value before the boundary and at the value after the boundary, so these are three values.
This is the best way that you perform boundary value analysis, but make sure that inside for example ISTQB..
ISTQB exams, ISTQB foundation level and so on,
most of the time they use two-value boundary value analysis.
So this depends on your system, if you are working in an environment you are testing on your own,
there are no restrictions from outside,
just use three-value boundary value analysis.
Test the value, before it, and after it.
But if you are inside an exam, an interview, and he asks you to apply boundary value analysis.
If he says two value boundary or if he tells you that the values are greater than, less than, greater
than or equal to, you should use two value. In two-value boundary value analysis,
I must know the boundary of the system specifically.
So here for example, if I will begin studying at 5 PM Exactly.
So if my friend comes at 5 PM, will he find me studying or not? he should find me studying, I should
begin studying.
Okay.
So in this case, we will not test at 5:01.
Why?
Because 5:00 and 5:01 are the same.
They have the same expected result.
So we will test at the first value inside this partition and the last value inside the previous partition.
So for example, if I tell you that you must be at least 13 years in order to register on a social media
for example Facebook.
OK.
So here, 13 is the beginning of the valid partition, the partition that you can register on Facebook
at it. And 12 is the last value inside the invalid partition that you are not able to log in or
register on Facebook inside.
So here we will test at 12 and 13.
But if we use three-value boundary value analysis, we will test at 12, 13, and 14. Boundary value analysis
is of course better than equivalence partitioning.
And I advise you to use it inside your work while you are testing your website,
think about what are the section that I can apply boundary value analysis on?
We will begin to solve some examples on boundary value analysis now.
If you have any example that you don't understand, just send it to me and I'll record a separate video
for it. Thank you and see you in the next video.