CH05.L03 . BBT-2-boundary value analysis

MaharaTech - ITI MOOCA
16 Apr 201702:47

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

00:00

πŸ” 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)

Boundary Value Analysis (BVA) is a black box testing technique used to design test cases around the boundaries of input values. It is based on the assumption that errors are more likely to occur at the boundaries of the input domain. The script mentions BVA as a technique to identify and test boundary values, such as the first and last numbers in a range, to uncover potential bugs. For instance, in the script, BVA is applied to a range from 1 to 100, inclusive, to ensure that the boundaries are correctly handled in the software.

πŸ’‘Black Box Testing

Black Box Testing is a method of software testing where the tester does not need to know the internal workings of the application. It focuses on the inputs and outputs of the software and whether the output is correct for a given input. The script discusses the use of Black Box Testing in conjunction with BVA, emphasizing that testers cannot see the code and must rely on testing techniques to ensure the software functions correctly.

πŸ’‘Inclusive Range

An inclusive range means that both the lower and upper bounds of the range are included in the set of possible values. The script specifies that the data range is from 1 to 100, inclusive, which implies that both 1 and 100 are valid inputs. This is a critical detail for BVA, as it determines the set of test cases needed to ensure the software handles the boundaries correctly.

πŸ’‘Lower Boundary

The lower boundary refers to the smallest value in a given range. In the context of the script, the lower boundary is 1, and it is a critical point for BVA because it is where the software's handling of the minimum input value is tested. The script uses the lower boundary to create a test case to verify if the software includes the boundary value correctly.

πŸ’‘Upper Boundary

The upper boundary is the largest value in a range. In the script, the upper boundary is 100, and it is similarly important for BVA as it tests the software's ability to handle the maximum input value. The script demonstrates the creation of a test case for the upper boundary to ensure the software includes this value as specified.

πŸ’‘Test Cases

Test cases are specific scenarios or sets of conditions under which a software program is tested to determine whether it behaves as expected. The script describes the creation of test cases using BVA, focusing on the boundaries and nearby values to ensure comprehensive testing of the software's input handling.

πŸ’‘Equivalence Partitioning (EP)

Equivalence Partitioning is another black box testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. The script mentions integrating EP with BVA to reduce the number of test cases needed, by considering the middle values (2 and 99) as part of the same partition and testing only one of them.

πŸ’‘Valid and Invalid Values

Valid values are those within the acceptable range of input for a software application, while invalid values are outside of this range. The script discusses identifying both valid and invalid values to create test cases that cover all possible scenarios, ensuring the software can handle both correctly.

πŸ’‘Optimum Test Cases

Optimum test cases refer to the minimal set of test cases that can cover all possible scenarios within the input domain, ensuring thorough testing with efficiency. The script calculates the optimum number of test cases needed after applying BVA and integrating it with EP, arriving at a total of 5 test cases for the given example.

πŸ’‘Decimal Boundary

A decimal boundary is a boundary value that includes a decimal point, such as 10.0 in the script. When applying BVA to decimal boundaries, the test values chosen are just above and below the boundary, like 10.1 and 9.9, to test the software's handling of inputs near the boundary.

πŸ’‘Data Inputs

Data inputs are the values provided to a software system as part of its operation. The script emphasizes the importance of testing data inputs, particularly numbers and dates, which have inherent boundaries that can be prone to errors if not handled correctly by the software.

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

play00:03

In the software

play00:05

that has range of data,

play00:07

we find most of the bugs appear at the boundaries.

play00:09

In other words, the first

play00:11

and last number of a range. we'll start with

play00:13

an example directly to apply on it in a better way.

play00:15

it is written in the requirements that

play00:17

there is range of data from 1: 100

play00:19

and they are inclusive, that means

play00:21

1 and 100 are included in this range.

play00:23

the developer may forget such thing in

play00:25

writing the code; to put

play00:27

the sign >=

play00:29

or the sign <=

play00:31

this will cause that the numbers

play00:33

1 & 100 will not be included in the range.

play00:35

and this is wrong. And since we are using

play00:37

Black box testing and can't

play00:39

see the code, so it is time to use

play00:41

boundary value analysis technique.

play00:43

or BVA, which let us write

play00:45

the test case of the boundaries

play00:47

to cover any problem that may happen with it.

play00:49

BVA technique consists of

play00:51

2 steps. The first step is to

play00:53

identify the boundaries,

play00:55

which are: lower boundary & upper boundary.

play00:57

The second step, we take one number up and down

play00:59

of each boundary, and we test the m

play01:01

in the test case and by applying the BVA technique

play01:03

on the example of 1&100,

play01:05

Firstly,

play01:07

we will make a test case at the value of

play01:09

the lower boundary which is 1.

play01:11

Secondly, at the value of the upper boundary

play01:13

which is 100. Thirdly,

play01:15

we'll make a test case for the number

play01:17

that is smaller than the lower boundary which is 0.

play01:19

Fourthly, one for the number that is bigger

play01:21

than the lower boundary which is 2.

play01:23

Fifthly, we'll make

play01:25

a test case at the number that is smaller

play01:27

than the upper boundary which is 99.

play01:29

Sixthly, one for the number

play01:31

that is bigger than the upper boundary

play01:33

which is 101. Through the previous video,

play01:35

we know that we should identify

play01:37

the valid values and the invalid values.

play01:39

now number of the optimum test cases

play01:41

which will cover everything is

play01:43

6 test cases.

play01:45

We can consider that by integrating the 2 techniques;

play01:47

the BVA & EP,

play01:49

We can consider the 2 middle numbers

play01:51

( 2 & 99) are from the same group

play01:53

or from the same partition.

play01:55

So in this case. it will be enough to

play01:57

test only one of them.

play01:59

So, the total number of test cases

play02:01

we need to make is 5 only.

play02:03

The most important point we should

play02:05

assure is that BVA can be applied

play02:07

on numbers and dates only,

play02:09

because those types with boundaries.

play02:11

The last note is that, if the boundary

play02:13

is a decimal number

play02:15

like: 10.0 so we will choose

play02:17

the above value 10.1

play02:19

and the the below value 9.9.

play02:21

what is intended here is that

play02:23

the test values we choose

play02:25

is at the less point of values

play02:27

Now we finished the second

play02:29

Black box technique which is

play02:31

Boundary Value Analysis, which we

play02:33

use with the Equivalence Partitioning.

play02:35

because it covers all the boundaries

play02:37

that most of the problems may happen

play02:39

with the data inputs of numbers

play02:41

and dates.

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Software TestingBug DetectionBoundary ValuesTest CasesInclusive RangesBlack BoxEquivalence PartitioningQuality AssuranceData InputsDecimal Testing