Boundary Value Analysis: Testing Technique for Identifying Program Errors, Slides of Computer Science

An introduction to Boundary Value Analysis (BVA), a software testing technique used to identify errors at the boundaries of input domains. the program view for boundary analysis, the rationale for BVA, and the critical assumption made with boundary value testing. It also discusses variations of BVA, including robustness testing and worst case testing. useful for university students and lifelong learners studying software testing and quality assurance.

Typology: Slides

2021/2022

Uploaded on 07/05/2022

gavin_99
gavin_99 🇦🇺

4.3

(73)

998 documents

1 / 38

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Boundary Value Testing
Chapter 5
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26

Partial preview of the text

Download Boundary Value Analysis: Testing Technique for Identifying Program Errors and more Slides Computer Science in PDF only on Docsity!

Boundary Value Testing

Chapter 5

Introduction

 Input domain testing is the most commonly taught (and
perhaps the most commonly used) software testing
technique
 There are a number of approaches to boundary value
analysis
 We will study some of the limitations of domain testing

Program view for boundary analysis – 2

 Many programs can be viewed as a function F that
maps values from a set A (its domain) to values in
another set B (its range)
 The input variables of F will have some (possibly
unstated) boundaries:

F ( x

, x

) : A " B

a " x

" b c " x

" d

What is BVA?

 What is boundary analysis?

Rational for BVA

 What is the rationale for BVA?

Rational for BVA – 2

 What is the rationale for BVA?

 Errors occur at boundaries because people  Mistake logical relations such as mixing < with  Are off by one in counting  Fence posts and rails

Critical assumption

 What is the critical assumption made with boundary
value testing?
 Single Fault Assumption

 Failures are rarely the result of the simultaneous occurrence of two (or more) faults

Single fault assumption

 Based on this assumption
 How are test cases selected when multiple
variables are involved?

Single fault assumption – 3

 Generate test cases as such for all i

 Values of all but one variable x i at nominal  x i assumes the four non-nominal values from the slide Boundary Analysis – 2  One test case with all nominal values

 What are the number of test cases?

#Variables * 4 + 1 See Figure 5.

Two-variable function test cases

<x

1nom

, x

2min

<x

1nom

, x

2min+

<x

1nom

, x

2nom

<x

1nom

, x

2max-

<x

1nom

, x

2max

<x

1min

, x

2nom

<x

1min+

, x

2nom

<x

1nom

, x

2nom

<x

1max-

, x

2nom

<x

1max

, x

2nom

Apply BVA to the Triangle problem 1 ≤ a ≤ 200 1 ≤ b ≤ 200 1 ≤ c ≤ 200 Redundant tests

Advantages – 2

 Independent variables

 Single fault assumption

 Physical quantities
 Languages that are not strongly typed

Why were strongly typed languages developed?

Advantages – 3

 Independent variables

 Single fault assumption

 Physical quantities
 Languages that are not strongly typed

Why were strongly typed languages developed?  To prevent errors easily found with BVA

Limitations – 2

 Does not work well for Boolean variables

Why are these not suitable?

 Does not work well for logical variables

 PIN, transaction type  Why are these not suitable?

 When variables are not independent – i.e. are
dependent

What example does the textbook give?

 Not that useful for strongly-typed languages

Variations of boundary value analysis

 What extensions or variations are made for
boundary value analysis?
 What is the justification for each?