![]() |
Development Lifecycle »
Testing and QA »
General
Intermediate
License: The Code Project Open License (CPOL)
Black-box Testing TechniquesBy Robin_RoyBlack box testing and developing test cases. |
All Topics, QA
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
Software is tested from two different perspectives:
In both cases, the intent is to find the maximum number of errors with the minimum amount of effort and time.
Black-box testing alludes to tests that are conducted at the software interface. Although they are designed to uncover errors, black-box tests are used to demonstrate that software functions are operational, that input is properly accepted and output is correctly produced, and that the integrity of external information (e.g., a database) is maintained. A black-box test examines some fundamental aspects of a system with little regard for the internal logical structure of the software.
Black-box testing, also called behavioural testing, focuses on the functional requirements of the software. That is, black-box testing enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. Black-box testing is not an alternative to white-box techniques. Rather, it is a complementary approach that is likely to uncover a different class of errors than white-box methods.
Black-box testing attempts to find errors in the following categories:
Unlike white-box testing, which is performed early in the testing process, black box testing tends to be applied during later stages of testing.
Because black-box testing purposely disregards control structure, attention is focused on the information domain. Tests are designed to answer the following questions:
There are various techniques in developing test cases for black box testing. I will be explaining two of the most common techniques, Equivalence Partitioning and BVA (Boundary Value Analysis)
Equivalence partitioning is a black-box testing method that divides the input domain of a program into classes of data from which test cases can be derived. Test case design for equivalence partitioning is based on an evaluation of equivalence classes for an input condition. An equivalence class represents a set of valid or invalid states for input conditions. Typically, an input condition is either a specific numeric value, a range of values, a set of related values, or a boolean condition. Equivalence classes may be defined according to the following guidelines:
As an example, consider data maintained as part of an automated banking application.
The user can access the bank using a personal computer, provide a six-digit password, and follow with a series of typed commands that trigger various banking functions. During the log-on sequence, the software supplied for the banking application accepts data in the form:
The input conditions associated with each data element for the banking application can be specified as area code:
Applying the guidelines for the derivation of equivalence classes, test cases for each input domain data item can be developed and executed. Test cases are selected so that the largest number of attributes of an equivalence class are exercised at once.
BVA extends equivalence partitioning by focusing on data at the “edges” of an equivalence class.
For reasons that are not completely clear, a greater number of errors tends to occur at the boundaries of the input domain rather than in the "center". It is for this reason that boundary value analysis (BVA) has been developed as a testing technique. Boundary value analysis leads to a selection of test cases that exercise bounding values.
Boundary value analysis is a test case design technique that complements equivalence partitioning. Rather than selecting any element of an equivalence class, BVA leads to the selection of test cases at the "edges" of the class. Rather than focusing solely on input conditions, BVA derives test cases from the output domain as well.
Guidelines for BVA are similar in many respects to those provided for equivalence partitioning:
Most software engineers intuitively perform BVA to some degree. By applying these guidelines, boundary testing will be more complete, thereby having a higher likelihood for error detection.
| You must Sign In to use this message board. | |||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 8 Jun 2009 Editor: Smitha Vijayan |
Copyright 2009 by Robin_Roy Everything else Copyright © CodeProject, 1999-2009 Web21 | Advertise on the Code Project |