Print Page | Close Window

Boundary Value Analysis

Printed From: One Stop Testing
Category: Types Of Software Testing @ OneStopTesting
Forum Name: Manual Testing @ OneStopTesting
Forum Discription: Discuss All that is need to be known about Manual Software Testing and its Tools.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=6769
Printed Date: 25Dec2024 at 2:07am


Topic: Boundary Value Analysis
Posted By: Mithi25
Subject: Boundary Value Analysis
Date Posted: 01Aug2009 at 5:43am

Overview


Boundary value analysis is a software testing design technique to determine test cases covering off-by-one errors. The boundaries of software component input ranges are areas of frequent problems.

Contents:
  • http://www.onestoptesting.com/boundary-value-analysis/introduction.asp - Introduction

  • http://www.onestoptesting.com/boundary-value-analysis/definition.asp - What is Boundary Value Analysis?

  • http://www.onestoptesting.com/boundary-value-analysis/purpose.asp - Purpose

  • http://www.onestoptesting.com/boundary-value-analysis/applying.asp - Applying Boundary Value Analysis

  • http://www.onestoptesting.com/boundary-value-analysis/performing.asp - Performing Boundary Value Analysis

Introduction


Testing experience has shown that especially the boundaries of input ranges to a software component are liable to defects. A programmer implement e.g. the range 1 to 12 at an input, which e.g. stands for the month January to December in a date, has in his code a line checking for this range. This may look like:

if (month > 0 && month < 13)

But a common programming error may check a wrong range e.g. starting the range at 0 by writing:


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.

Definition


Boundary value analysis is a methodology for designing test cases that concentrates http://www.onestoptesting.com/boundary-value-analysis/definition.asp# - - software - software component. This has to be done by applying the equivalence partitioning technique. Boundary value analysis and equivalence partitioning are inevitably linked together. For the example of the month in a date you would have the following partitions:


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


Applying boundary value analysis you have to select now a http://www.onestoptesting.com/boundary-value-analysis/applying.asp# - - test

A further set of boundaries has to be considered when you set up your test cases. A solid testing strategy also has to consider the natural boundaries of the data types used in the program. If you are working with signed values this is especially the range around zero (-1, 0, +1). Similar to the typical range check faults, http://www.onestoptesting.com/boundary-value-analysis/applying.asp# - - programmers tend to have weaknesses in their 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 the 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.




-------------
http://www.quick2sms.com - Send Unlimited FREE SMS to Any Mobile Anywhere in INDIA,
Click Here



Print Page | Close Window