Boundary value analysis

Boundary value analysis

Boundary value analysis is a software testing design technique used to determine test cases covering off-by-one errors.

Introduction

Testing experience has shown that the boundaries of input ranges to a software component are likely to contain defects. For instance: a function that takes an integer between 1 and 12, representing a month between January to December, might contain a check for this range:void exampleFunction(int month) { if (month > 0 && month < 13) ....A common programming error is to check an incorrect range e.g. starting the range at 0 by writing:void exampleFunction(int month) { if (month >= 0 && month < 13) ....For more complex range checks in a program this may be a problem which is not so easily spotted as in the above simple example.

Applying boundary value analysis

To set up boundary value analysis test cases, the tester first determines which boundaries are at the interface of a software component. This is done by applying the equivalence partitioning technique. For the aboveexample, the month parameter would have the following partitions:

... -2 -1 0 1 .............. 12 13 14 15 ..... --------------|-------------------|--------------------- invalid partition 1 valid partition invalid partition 2

To apply boundary value analysis, a test case at each side of the boundary between two partitions is selected. In the above example this would be 0 and 1 for the lower boundary as well as 12 and 13 for the upper boundary. Each of these pairs consists of a "clean" and a "negative" test case. A "clean" test case should lead to a valid result. A "negative" test case should lead to specified error handling such as the limiting of values, the usage of a substitute value, or a warning. Boundary value analysis can result in three test cases for each boundary; for example if n is a boundary, test cases could include n-1, n, and n+1.

A further set of boundaries has to be considered when test cases are set up. A solid testing strategy also has to consider the natural boundaries of the data types used in the program. If working with signed values, for example, this may be the range around zero (-1, 0, +1). Similar to the typical range check faults, there tend to be weaknesses in programs in this range. e.g. this could be a division by zero problem where a zero value may occur although the programmer always thought the range started at 1. It could be a sign problem when a value turns out to be negative in some rare cases, although the programmer always expected it to be positive. Even if this critical natural boundary is clearly within an equivalence partition it should lead to additional test cases checking the range around zero. A further natural boundary is the natural lower and upper limit of the data type itself. E.g. an unsigned 8-bit value has the range of 0 to 255. A good test strategy would also check how the program reacts at an input of -1 and 0 as well as 255 and 256.

The tendency is to relate boundary value analysis more to so called
black box testing, which is strictly checking a software component at its interfaces, without consideration of internal structures of the software. But looking closer at the subject, there are cases where it applies also to
white box testing.

After determining the necessary test cases with equivalence partitioning and subsequent boundary value analysis, it is necessary to define the combinations of the test cases when there are multiple inputs to a software component.

External Links

* To generate pairs and boundary-interactions, www.testersdesk.com is a free online source


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Boundary value problem — In mathematics, in the field of differential equations, a boundary value problem is a differential equation together with a set of additional restraints, called the boundary conditions. A solution to a boundary value problem is a solution to the… …   Wikipedia

  • Elliptic boundary value problem — In mathematics, an elliptic boundary value problem is a special kind of boundary value problem which can be thought of as the stable state of an evolution problem. For example, the Dirichlet problem for the Laplacian gives the eventual… …   Wikipedia

  • Stochastic processes and boundary value problems — In mathematics, some boundary value problems can be solved using the methods of stochastic analysis. Perhaps the most celebrated example is Shizuo Kakutani s 1944 solution of the Dirichlet problem for the Laplace operator using Brownian motion.… …   Wikipedia

  • Boundary testing — or boundary value analysis, is where test cases are generated using the extremes of the input domain, e.g. maximum, minimum, just inside/outside boundaries, typical values, and error values. It is similar to Equivalence Partitioning but focuses… …   Wikipedia

  • Boundary case — The term boundary case is frequently used in software engineering to refer to the behavior of a system when one of its inputs is at or just beyond its maximum or minimum limits. It is frequently used when discussing software testing.For example,… …   Wikipedia

  • Value Measuring Methodology — (or VMM) is a tool that helps planners balance both tangible and intangible values when making investment decisions, and monitor benefits.Formal methods to calculate the Return on Investment (or ROI) have been widely understood and used for a… …   Wikipedia

  • analysis — /euh nal euh sis/, n., pl. analyses / seez /. 1. the separating of any material or abstract entity into its constituent elements (opposed to synthesis). 2. this process as a method of studying the nature of something or of determining its… …   Universalium

  • List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

  • Intelligence analysis — This article deals with the intellectual process of analysis itself, as opposed to intelligence analysis management, which, in turn, is a subcomponent of intelligence cycle management. For a complete hierarchical list of articles in this series,… …   Wikipedia

  • Clifford analysis — Clifford analysis, using Clifford algebras named after William Kingdon Clifford, is the study of Dirac operators, and Dirac type operators in analysis and geometry, together with their applications. Examples of Dirac type operators include, but… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”