CH05.L03 . BBT-2-boundary value analysis
Summary
TLDRThe script discusses the Boundary Value Analysis (BVA) technique in software testing, emphasizing its importance in identifying bugs at data range boundaries. It outlines a two-step process: identifying lower and upper boundaries, then testing values just inside and outside these limits. The example provided demonstrates BVA's application with a range from 1 to 100, highlighting the need to test values like 0, 1, 2, 99, 100, and 101. The script also mentions combining BVA with Equivalence Partitioning to optimize test cases, reducing them to five from six by eliminating redundant tests. It concludes by noting BVA's applicability to numbers and dates, and the selection of test values for decimal boundaries.
Takeaways
- π Bugs often occur at the boundaries of data ranges, specifically at the first and last numbers.
- π The requirement specifies a data range from 1 to 100, inclusive, meaning both 1 and 100 are valid inputs.
- π Developers might overlook inclusive boundaries in code, leading to incorrect implementations without the use of >= or <=.
- π Black box testing is used when the internal code is not visible, necessitating the use of testing techniques like Boundary Value Analysis (BVA).
- π BVA involves two steps: identifying the lower and upper boundaries and then testing values just above and below these boundaries.
- π The BVA technique suggests creating test cases for the exact boundary values, one value less than the lower boundary, one value more than the lower boundary, one value less than the upper boundary, and one value more than the upper boundary.
- π’ The script provides an example using the range 1 to 100, suggesting test cases for 0, 1, 2, 99, 100, and 101.
- π‘ By combining BVA with Equivalence Partitioning (EP), it's possible to reduce the number of test cases by considering some values as part of the same partition.
- π The script concludes that with BVA and EP, only 5 test cases are needed to cover the range 1 to 100 effectively.
- π BVA is particularly applicable to numeric and date values, which have clear boundaries.
- π When boundaries are decimal numbers, test values should be chosen just above and below the boundary, such as 10.1 and 9.9.
- π The script emphasizes that BVA, when used in conjunction with EP, covers all boundary issues that may arise with numeric and date inputs.
Q & A
What is the primary focus of bugs in software with a range of data?
-The primary focus of bugs in software with a range of data is at the boundaries, specifically the first and last numbers of the range.
What does it mean when a range is inclusive?
-An inclusive range means that both the lower and upper boundaries, such as 1 and 100 in the example, are included in the data set.
Why might developers forget to include the boundaries in their code?
-Developers might forget to include the boundaries in their code by not using the correct signs (>= or <=), which can lead to the exclusion of the boundary values like 1 and 100.
What is the Boundary Value Analysis (BVA) technique?
-The Boundary Value Analysis (BVA) technique is a testing method that focuses on the boundaries of input values to ensure that all potential issues are covered.
What are the two steps involved in the BVA technique?
-The two steps in the BVA technique are: 1) Identifying the boundaries (lower and upper), and 2) Testing values just above and below each boundary.
What are the specific test cases suggested for the example range of 1 to 100?
-The specific test cases for the range of 1 to 100 include values at the lower boundary (1), upper boundary (100), below the lower boundary (0), above the lower boundary (2), below the upper boundary (99), and above the upper boundary (101).
How can the number of test cases be reduced by combining BVA and Equivalence Partitioning (EP)?
-By combining BVA and EP, you can consider the two middle numbers (2 and 99) as part of the same partition, reducing the number of test cases needed to 5 instead of 6.
What is the significance of identifying valid and invalid values in testing?
-Identifying valid and invalid values helps in designing test cases that cover all possible scenarios and ensures that the software behaves correctly under both expected and unexpected conditions.
Why is BVA particularly applicable to numbers and dates?
-BVA is particularly applicable to numbers and dates because these types of data inherently have boundaries that can be tested for potential issues.
How should test values be chosen when dealing with decimal boundaries?
-When dealing with decimal boundaries, such as 10.0, test values should be chosen just above (e.g., 10.1) and just below (e.g., 9.9) the boundary to ensure thorough testing.
What is the main advantage of using BVA in conjunction with Equivalence Partitioning?
-The main advantage of using BVA in conjunction with Equivalence Partitioning is that it covers all the boundaries where most problems may occur with numeric and date data inputs, making the testing process more comprehensive.
Outlines
π Boundary Value Analysis in Software Testing
This paragraph discusses the prevalence of bugs at the boundaries of data ranges in software. It emphasizes the importance of boundary value analysis (BVA), a black box testing technique, to identify and address potential issues at the edges of a data range. The script provides a clear example with a data range from 1 to 100, inclusive, and explains how developers might overlook including these boundaries in their code. The BVA technique is broken down into two steps: identifying the lower and upper boundaries, and then testing values just above and below these boundaries. The paragraph also introduces the concept of Equivalence Partitioning (EP) and suggests combining it with BVA for more efficient testing. It concludes with a note on the applicability of BVA to numbers and dates and how to handle decimal boundaries.
Mindmap
Keywords
π‘Boundary Value Analysis (BVA)
π‘Black Box Testing
π‘Inclusive Range
π‘Lower Boundary
π‘Upper Boundary
π‘Test Cases
π‘Equivalence Partitioning (EP)
π‘Valid and Invalid Values
π‘Optimum Test Cases
π‘Decimal Boundary
π‘Data Inputs
Highlights
Bugs often appear at the boundaries of data ranges.
Developers might forget to include boundary values in code, leading to errors.
Boundary Value Analysis (BVA) is a technique used to test boundary values.
BVA consists of identifying boundaries and testing values around them.
Lower and upper boundaries are the primary focus in BVA.
Test cases should include values at, above, and below the boundaries.
Test cases should cover the lower boundary value, such as 1.
Test cases should cover the upper boundary value, such as 100.
Test cases should include a value less than the lower boundary, such as 0.
Test cases should include a value greater than the lower boundary, such as 2.
Test cases should include a value less than the upper boundary, such as 99.
Test cases should include a value greater than the upper boundary, such as 101.
Valid and invalid values should be identified for comprehensive testing.
Optimum test cases for boundary values can be reduced by integrating BVA and Equivalence Partitioning (EP).
Only one test case is needed for middle values when using BVA and EP together.
BVA is primarily applicable to numbers and dates with clear boundaries.
Decimal boundaries require testing values just above and below, such as 10.1 and 9.9.
BVA combined with EP covers all boundary issues with numerical and date inputs.
Transcripts
In the software
that has range of data,
we find most of the bugs appear at the boundaries.
In other words, the first
and last number of a range. we'll start with
an example directly to apply on it in a better way.
it is written in the requirements that
there is range of data from 1: 100
and they are inclusive, that means
1 and 100 are included in this range.
the developer may forget such thing in
writing the code; to put
the sign >=
or the sign <=
this will cause that the numbers
1 & 100 will not be included in the range.
and this is wrong. And since we are using
Black box testing and can't
see the code, so it is time to use
boundary value analysis technique.
or BVA, which let us write
the test case of the boundaries
to cover any problem that may happen with it.
BVA technique consists of
2 steps. The first step is to
identify the boundaries,
which are: lower boundary & upper boundary.
The second step, we take one number up and down
of each boundary, and we test the m
in the test case and by applying the BVA technique
on the example of 1&100,
Firstly,
we will make a test case at the value of
the lower boundary which is 1.
Secondly, at the value of the upper boundary
which is 100. Thirdly,
we'll make a test case for the number
that is smaller than the lower boundary which is 0.
Fourthly, one for the number that is bigger
than the lower boundary which is 2.
Fifthly, we'll make
a test case at the number that is smaller
than the upper boundary which is 99.
Sixthly, one for the number
that is bigger than the upper boundary
which is 101. Through the previous video,
we know that we should identify
the valid values and the invalid values.
now number of the optimum test cases
which will cover everything is
6 test cases.
We can consider that by integrating the 2 techniques;
the BVA & EP,
We can consider the 2 middle numbers
( 2 & 99) are from the same group
or from the same partition.
So in this case. it will be enough to
test only one of them.
So, the total number of test cases
we need to make is 5 only.
The most important point we should
assure is that BVA can be applied
on numbers and dates only,
because those types with boundaries.
The last note is that, if the boundary
is a decimal number
like: 10.0 so we will choose
the above value 10.1
and the the below value 9.9.
what is intended here is that
the test values we choose
is at the less point of values
Now we finished the second
Black box technique which is
Boundary Value Analysis, which we
use with the Equivalence Partitioning.
because it covers all the boundaries
that most of the problems may happen
with the data inputs of numbers
and dates.
Browse More Related Video
Software Testing Tutorial #35 - Boundary Value Analysis in Testing
ISTQB FOUNDATION 4.0 | Tutorial 31 | Boundary Value Analysis | Test Techniques | ISTQB Tutorials
CH05.L02.BBT-1-Equivalence Partitioning
CH05.L06 . BBT-5-Use case
Software Testing Tutorial #34 - Equivalence Partitioning in Testing
ISTQB FOUNDATION 4.0 | Tutorial 29 | Test Techniques Overview | Test Design Techniques | CTFL
5.0 / 5 (0 votes)