Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information & Communication Technology Engineering/
  4. ICT Semester 5/
  5. Software Engineering (4353202)/

3 mins· ·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Lecture 39: Black Box Testing - Boundary Value Analysis

Lecture 39: Black Box Testing - Boundary Value Analysis

Unit 5: Software Coding and Testing (4353202)

Lecture Agenda

  • Recap of Equivalence Partitioning
  • What is Boundary Value Analysis (BVA)?
  • Why is BVA Important?
  • How Boundary Value Analysis Works
  • Example of Boundary Value Analysis
  • Advantages and Disadvantages of BVA
  • Key Takeaways

Recap of Equivalence Partitioning

Equivalence Partitioning is a black box testing technique that divides input data into valid and invalid partitions, selecting one representative value from each. It reduces test cases but doesn't specifically target boundary conditions.

What is Boundary Value Analysis (BVA)?

Boundary Value Analysis (BVA) is a black box testing technique that focuses on testing the values at the boundaries of input domains. It is based on the idea that errors are most likely to occur at the extreme ends of the input values.

BVA is often used in conjunction with Equivalence Partitioning to provide more robust test coverage.

Why is BVA Important?

  • High Defect Yield: Many defects occur at the boundaries of input ranges.
  • Complements Equivalence Partitioning: Addresses the weakness of EP by specifically testing edge cases.
  • Systematic Approach: Provides a structured way to identify test cases for boundary conditions.
  • Ensures Robustness: Helps ensure the software handles extreme valid and invalid inputs correctly.

How Boundary Value Analysis Works

For a given input range [Min, Max], BVA typically involves testing the following values:

  • Min: The minimum valid value.
  • Min + 1: A value just above the minimum valid value.
  • Max: The maximum valid value.
  • Max - 1: A value just below the maximum valid value.
  • Min - 1: A value just below the minimum invalid value.
  • Max + 1: A value just above the maximum invalid value.

Example: Age Input Field (18-60)

Consider a system that accepts age input between 18 and 60 (inclusive).

  • Minimum Valid Value (Min): 18
  • Maximum Valid Value (Max): 60

Test Cases derived from BVA:

  • Min - 1: 17 (Invalid)
  • Min: 18 (Valid)
  • Min + 1: 19 (Valid)
  • Max - 1: 59 (Valid)
  • Max: 60 (Valid)
  • Max + 1: 61 (Invalid)

Test Values: 17, 18, 19, 59, 60, 61

Advantages of Boundary Value Analysis

  • Effective at Finding Bugs: Many errors occur at boundaries, so BVA is very effective.
  • Simple and Systematic: Easy to apply and provides a clear set of test cases.
  • Complements EP: Works well with Equivalence Partitioning to provide comprehensive test coverage.
  • Reduces Redundancy: Avoids testing values far from the boundaries, which are less likely to reveal errors.

Disadvantages of Boundary Value Analysis

  • Not Suitable for Boolean or Non-Numeric Data: Primarily applicable to inputs with defined ranges.
  • Doesn't Cover All Scenarios: Only focuses on boundaries, not combinations of inputs.
  • Assumes Independence: Assumes that input variables are independent, which may not always be true.

Key Takeaways

  • **Boundary Value Analysis** tests values at the **extreme ends** of input ranges.
  • It is highly effective at finding **bugs at the boundaries**.
  • Often used **with Equivalence Partitioning** for comprehensive black box testing.
  • Focuses on **Min, Min+1, Max-1, Max, Min-1, Max+1** values.

Next Lecture

Topic: White Box Testing - Statement & Branch Coverage

Q & A

Questions & Discussion