Software Testing Tutorial #35 - Boundary Value Analysis in Testing
Summary
TLDRThis tutorial delves into Boundary Value Analysis (BVA), a critical software testing technique that complements Equivalence Partitioning (EP). The instructor uses a relatable house-building analogy to explain BVA, emphasizing the importance of testing at boundary values where software often fails. The tutorial demonstrates how to apply both techniques together to create effective test cases for maximum component coverage, highlighting their necessity for manual testers and those aspiring to excel in software testing.
Takeaways
- π Boundary Value Analysis (BVA) is a software testing technique that focuses on the boundaries of input ranges and values.
- π BVA is often used in conjunction with Equivalence Partitioning (EP) to create comprehensive test cases.
- π The script uses the analogy of building a house to explain BVA, emphasizing the importance of defining boundaries before constructing the 'house' or test cases.
- π Equivalence Partitioning divides the input range into valid and invalid partitions to simplify testing by reducing the number of test cases needed.
- π The tutorial provides a discount example to illustrate how to apply both EP and BVA to identify test cases with maximum coverage.
- π BVA is crucial for identifying potential failures at the boundaries of input ranges, where software components are more likely to fail due to calculation and logic errors.
- π The script explains how to determine the lower and upper boundary values for each partition and the importance of testing these values.
- π Invalid partitions, such as purchases below $1 or above $5001, are also considered in BVA to ensure the software handles these cases correctly.
- π The tutorial emphasizes the importance of testing both within and at the boundaries of valid partitions to achieve full test coverage.
- π Understanding BVA and EP is essential for manual testers and those looking to enter the field of software testing.
- πΌ The concepts of BVA and EP are valuable for explaining test design techniques during interviews for software testing roles.
Q & A
What is Boundary Value Analysis (BVA)?
-Boundary Value Analysis is a black box software testing technique that focuses on testing inputs at the boundaries of an input domain. It is often used in conjunction with Equivalence Partitioning (EP) to ensure maximum test coverage.
How does Boundary Value Analysis complement Equivalence Partitioning?
-Equivalence Partitioning divides the input data into groups that are expected to behave similarly, while Boundary Value Analysis focuses on the edge values of these partitions. By combining both techniques, testers can ensure that both the normal and edge cases are thoroughly tested.
Can you provide an example of how to apply Boundary Value Analysis in a real-world scenario?
-The script uses the example of building a house on a plot of land. Just as you define the boundaries of your land before construction, in BVA, you define the boundaries of input values and then test within those boundaries to ensure the software behaves as expected.
What is the significance of testing at boundary values in software testing?
-Software components often fail at boundary values due to calculation and logic errors. Testing at these points helps identify potential issues that might not be caught with random testing within the range of valid inputs.
How does the script illustrate the concept of valid and invalid partitions in the context of a discount example?
-The script uses a discount example where different discount rates apply based on the amount spent. Valid partitions are the ranges of spending that qualify for specific discounts, while invalid partitions are values outside these ranges, such as amounts less than $1 or more than $5001, which are not allowed to purchase.
What are the boundary values for the 5% discount partition in the given example?
-For the 5% discount partition, the lower boundary value is $1.00, and the upper boundary value is $100.99, assuming the software does not round up to the next dollar.
How many boundary values are identified in the script for the discount example?
-The script identifies 10 boundary values across different discount partitions, including both valid and invalid boundaries.
Why is it important to test values between the boundary values in addition to the boundaries themselves?
-Testing values between boundary values ensures that the software behaves correctly within the entire range of valid inputs, not just at the edges. This helps achieve comprehensive test coverage and identify any potential issues that could arise within the input range.
What is the purpose of combining Equivalence Partitioning and Boundary Value Analysis in software testing?
-Combining these two techniques helps create a structured approach to testing that covers both typical and edge case scenarios. This method reduces the chance of missing critical test cases and provides clarity in test case design.
How does understanding BVA and EP help someone get into a software testing job?
-Understanding BVA and EP demonstrates knowledge of fundamental black box testing techniques, which are essential for manual testers and those looking to enter the field of software testing. Being able to explain and apply these concepts can make a candidate more attractive to potential employers.
Outlines
π Introduction to Boundary Value Analysis (BVA)
The script introduces the concept of Boundary Value Analysis (BVA) in software testing, following up on the previous tutorial on Equivalence Partitioning (EP). It uses the same example of a discount system to demonstrate how to apply both EP and BVA together for effective test case design. The example involves a website offering different discounts based on the amount spent, with valid partitions for discounts and invalid partitions for purchases below $1 or above $5001. The script explains the importance of understanding both valid and invalid boundaries to ensure comprehensive testing of the software component.
ποΈ Applying BVA with Equivalence Partitioning
This paragraph delves into the practical application of Boundary Value Analysis in conjunction with Equivalence Partitioning. It uses an analogy of building a house on a plot of land to explain the concept of defining boundaries and then constructing within those boundaries. The script translates this analogy to software testing, where boundaries are identified for each partition, and test cases are designed accordingly. It discusses how to determine lower and higher boundary values for different discount rates, emphasizing the importance of testing at these boundary values due to the likelihood of software failures at these points.
π Importance of Boundary Value Analysis in Software Testing
The final paragraph emphasizes the significance of Boundary Value Analysis in identifying potential failures in software components, particularly at boundary values where calculations and logic are prone to errors. It outlines the process of selecting test cases that cover both boundary and in-between values within valid partitions, as well as invalid partitions, to ensure thorough testing. The script concludes by highlighting the benefits of using BVA and EP together for comprehensive test coverage and provides advice for those looking to enter the field of software testing, encouraging them to understand these techniques for better test design and job prospects.
Mindmap
Keywords
π‘Boundary Value Analysis (BVA)
π‘Equivalence Partitioning (EP)
π‘Test Cases
π‘Discount Example
π‘Boundary Values
π‘Input Partitions
π‘Software Testing
π‘Coverage
π‘Black Box Testing
π‘Invalid Partitions
π‘Test Design Techniques
Highlights
Introduction to Boundary Value Analysis (BVA) in software testing.
The relationship between Equivalence Partitioning (EP) and BVA.
Using the same example from the previous tutorial to explain BVA.
Explanation of valid and invalid partitions in the context of a discount example.
How to apply EP and BVA together to create effective test cases.
The concept of partitioning discounts and purchase amounts in EP.
The analogy of building a house to explain the concept of BVA.
Defining boundaries for test cases in software testing, similar to land boundaries for a house.
The process of identifying boundary values within equivalence partitions.
Importance of testing boundary values due to higher failure rates at these points.
How to derive test cases from boundary values and partitions.
The significance of not rounding values in certain software modules.
Detailed explanation of boundary values for different discount percentages.
The approach to design test cases with predefined values for maximum coverage.
Advantages of using EP and BVA over random testing for software components.
The necessity of testing both boundary and in-between values for comprehensive coverage.
Practical application of BVA and EP in manual testing and software testing interviews.
Encouragement for viewers to ask questions for further clarification.
Transcripts
hello everyone welcome again in the
software testing tutorial
we are going to understand what is
boundary value analysis
so in the last tutorial we have
understood about equivalence
partitioning or
ep in short now we will understand about
bva
or boundary value analysis equivalence
partitioning and boundary value
analysis go hand in hand so i'll
continue with the same example
that i explained in the last tutorial
and i'll show you
how you can apply equivalence
partitioning and boundary value analysis
together
to come up with the best test cases to
get the maximum coverage for the
component
that you are going to test all right so
this is the discount
example that we have took in the last
tutorial
so these you know were the four valid
partition so i'll just write valid
and here it is invalid above 5001
should be not allowed to purchase right
so these are the discount purchases
that a particular website uh is offering
and we are say for example going to test
it so in equivalence partitioning what
we have done is we have partitioned
the discounts uh
and the amount that need to be purchased
in a particular partition right so for
example up to 100
from one two hundred dollars the
discount percentage should be five
percent
hundred and one to two hundred dollars
should be ten percent right
so this is what we have done to divide
the discount percentage into equivalence
partitions
and then we had invalid partition
because anything less than point
less than one dollar should should not
be allowed to purchase
and anything above five thousand one
dollar should shouldn't be
you know allowed uh the purchase
shouldn't be allowed in that case
so now if we talk about the boundary
value analysis
i'll come up with the example of the
boundary so
very raw example say for example
you are let me remove this as of now
i'll make it again
say for example you are building a house
okay
now when you are building a house you
have a piece of land
and the piece of land will have the
length and
breadth okay so this is length and this
is breadth
right so usually you know this is say
for example your frontage and say for
example this is of 10 meters
and this is of 20 meters depth okay
now when you're building the house you
basically first thing you do
is you see the map and you
define the boundaries of your
land or the piece of land that you have
bought to build the house right
so in this case you will say okay this
is you know this is my
you know boundary on the map 0 to 10
meters
okay this is what my frontage is and
then you know again from here
0 to 20 meter this is my depth is and
you define
the boundary once you define the
boundary of your
piece of land then you start you know
you you
have the boundary build and usually you
then you know define
all the plan and you start building your
house within that boundary
so boundary value analysis is no
different from what this example is
we have the boundaries so we define the
boundaries
and then within those boundaries what we
can do
as part of you know defining the test
cases we
define those test cases so in case of
building the house we define the
boundaries and then we build the house
okay we build house we build rooms
everything within the boundary
and in terms of boundary value analysis
and software we define the boundaries
and then we come up with the test cases
within those boundaries okay
so as part of equivalence partitioning
we have already defined
you know the partitions or
plots in this case or the piece of land
that everyone is going to build
okay say for example this is the
partition
i'll explain this with the same analogy
so this is say for example my plot this
is my niche's plot
say this is somebody else's so say ram's
plot
this is shiva's plot
okay and
this is for example tony's plot
right so now i know my plots boundary so
what i know is i know that this boundary
or
this plot or this partition
is mine and this partition is valid from
0 from 1 200 right so when we talk about
e-commerce thing
we have the values that are accepted in
this particular
partition so one dollar is what i should
be starting with
and up to say for example 100 or
whatever the end boundary
is i should be testing
this partition with those boundary okay
so first thing is in boundary value
analysis to
analyze the partition that you have done
in equivalence partition and get the
boundaries
okay so in this case the lower boundary
will be 100 uh one dollar okay
so we'll be starting with the lower
boundary as we have
understood in the plot example that if
the frontage is
10 meters so i'll start from 0 to 10
meters and i'll mark that
and then i'll go depth and start with
that so in this
five percent discount thing one dollar
is the
lower boundary and then
if say for example this particular
software or this particular module
accepts up to two decimal places and
doesn't
round those values so for example it
accepts 100.99
and doesn't round 0.99 to 101
okay it doesn't do that then the highest
boundary
of the purchase should be 100.99
okay so 100.99
is what the highest purchase amount
should be in this particular partition
that should still
be applicable for five percent discount
because as soon as
this changes to 101 dollar
right as soon as this changes to 101
dollar
this becomes the boundary lower boundary
of 10 percent discount
okay so that's how you analyze each of
the equivalence partition
and get the boundary values so in this
case the lower boundary value is 101
the higher boundary value is 200.99
because we have already you know assumed
that 0.99 is not getting rounded
to one dollar okay so this should still
be applicable
for 10 discount so we are getting the
lower boundary the higher boundary
same case as we had in the plot lower
boundary higher boundary for length and
breadth so that we can define
our plot and start building the house so
we are here we are defining
the lower boundary and higher boundary
so that
we can define what our boundaries are
what
this particular partitions boundary are
so that we can pick the values and start
defining which values we are going to
use in our test cases
okay here in the 20
discount the lower boundary is 201
and the higher boundary is again 500.99
in the 25 percent it is 501
the lower boundary and the higher
boundary is
5000.99
okay and then 5001
as soon as it reaches 5001 purchase
amount it is again
invalid purchase amount and it shouldn't
be allowed
or customer shouldn't be allowed to
purchase or make the purchase of that
particular amount right so you can
consider here that these are you know
sort of plots that we have
understood in the plot analogy and then
come up with the lower and higher
boundaries
and then design your test case so let me
move this and
now here in the invalid
lower invalid boundary we have this 0.99
anyways okay so now we have got these
equivalence partition which is we have
understood in the previous tutorial so
we have partitioned these discount
based on the values that are accepted in
the partitions
and we have also got the boundary so we
have got the boundary of 0.99
then we have got the boundary lower
boundary of five percent discount which
is one dollar
then 100.99 then 101
200.99 then
201 500.99
501 and 5000.99
right and then 5001
as soon as a person wants to purchase 5
000 one dollar
amount or want to spend on that
particular website it shouldn't
allow that right so now if you see
that instead of doing the random testing
when we use equivalence partition and
boundary value analysis together
we have come up with very predefined
test cases or the data that we use that
we need to use in our test cases from
each of the partitions along with the
boundary values
right why do we need to do the boundary
value analysis and testing because
the software components most of the time
you know because of the calculation and
logic
they are they tend to fail more at the
boundary values
okay so it is very necessary that we
test the
value in between along with all the
boundary values of the valid and invalid
partitions
okay so that is why now we have the
partitions so we can easily come up with
1 2 3 4 5 6 7
8 9 10 boundary values so we'll use
these
as our test cases okay along with
some values between these
valid partitions right so for example
you pick
one or two values from one two hundred
so you can pick you know ten dollars you
can pick
seventy dollars it will still be
considered as five percent discount
you pick one or two values from each of
these partitions
even if you pick just one should still
be fine and then pick all the boundary
values
and that is what will be required
to give you a complete coverage of
this particular component right so
rather than doing
random pick and choose and you know
start doing testing from one dollar to
50 to
you know 150 and then 200 and not
knowing the partitions and boundary
it's better to design your test cases
do the equivalence partition do the
boundary value analysis
and then use these values in
your test case or design your test case
which will give you a lot better
coverage
and clarity in terms of defining the
test cases and there will be very
minimal chance of
missing any of the boundary values or
equivalence partitions okay
so that is all for this particular
tutorial
on boundary value analysis boundary
value analysis goes hand in hand with
equivalence partition
so you have to apply both together to
get the
maximum benefit and these are the two
test design black box test design
techniques that
are must for you to understand
uh in terms of you know manual tester or
person who wants to get into software
testing and even in terms of
understanding and explaining to any
software testing interviewer
okay so if you explain all these
concepts with these sort of examples
and understand these in detail you will
be definitely be able to get into
software testing job very easily
so hope this was helpful and clear if
you want
you know any more detail or you have any
queries please do comment in the comment
section below
and i'll get back to you so that's all
for this tutorial
thank you very much for watching
Browse More Related Video
![](https://i.ytimg.com/vi/gXZgInvjaqc/hq720.jpg)
Software Testing Tutorial #34 - Equivalence Partitioning in Testing
![](https://i.ytimg.com/vi/XW4sI3JJSzg/hq720.jpg)
ISTQB FOUNDATION 4.0 | Tutorial 31 | Boundary Value Analysis | Test Techniques | ISTQB Tutorials
![](https://i.ytimg.com/vi/vuPdJrCoU1Q/hq720.jpg)
CH05.L03 . BBT-2-boundary value analysis
![](https://i.ytimg.com/vi/ZrmdG0qwX1U/hq720.jpg?sqp=-oaymwEmCIAKENAF8quKqQMa8AEB-AH-CYAC0AWKAgwIABABGGUgRShZMA8=&rs=AOn4CLAmJReExdIaFBC8Jrjx943fusBocg)
CH05.L02.BBT-1-Equivalence Partitioning
![](https://i.ytimg.com/vi/zE-THdINj1c/hq720.jpg)
CH05.L06 . BBT-5-Use case
![](https://i.ytimg.com/vi/RKa7iYwBpOI/hq720.jpg)
ISTQB FOUNDATION 4.0 | Tutorial 29 | Test Techniques Overview | Test Design Techniques | CTFL
5.0 / 5 (0 votes)