Black – Box Testing Techniques

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.

Software is tested from two different perspectives:

1. Internal program logic is exercised using “white box” test case design techniques.

2. Software requirements are exercised using “black box” test case design techniques.

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 Techniques

Black-box testing, also called behavioral 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:

1. Incorrect or missing functions.

2. Interface errors.

3. Errors in data structures or external database access.

4. Behavior or performance errors, and

5. Initialization and termination errors.

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:

  • How is functional validity tested?
  • How is system behavior and performance tested?
  • What classes of input will make good test cases?
  • Is the system particularly sensitive to certain input values?
  • How are the boundaries of a data class isolated?
  • What data rates and data volume can the system tolerate?
  • What effect will specific combinations of data have on system operation?
  • 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

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:

1. If an input condition specifies a range, one valid and two invalid equivalence classes are defined.

2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.

3. If an input condition specifies a member of a set, one valid and one invalid equivalence class are defined.

4. If an input condition is boolean, one valid and one invalid class are defined.

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:

  • Area code—blank or three-digit number.
  • Prefix—three-digit number not beginning with 0 or 1
  • Suffix—four-digit number.
  • Password—six digit alphanumeric string.
  • Commands—check, deposit, bill pay, and the like.

The input conditions associated with each data element for the banking application can be specified as area code:

  • Input condition, Boolean—the area code may or may not be present.
  • Input condition, range—values defined between 200 and 999, with specific exceptions.
  • Prefix: Input condition, range—specified value >200.
  • Input condition, value—four-digit length.
  • Password: Input condition, Boolean—a password may or may not be present.
  • Input condition, value—six-character string.
  • Command: Input condition, set—containing commands noted previously.

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.

Boundary Value Analysis

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:

  • If an input condition specifies a range bounded by values a and b, test cases should be designed with values a and b and values just above and just below a and b.
  • If an input condition specifies a number of values, test cases should be developed that exercise the minimum and maximum numbers. Values just above and below minimum and maximum are also tested.
  • Apply guidelines 1 and 2 to output conditions. For example, assume that a temperature vs. pressure table is required as output from an engineering analysis program. Test cases should be designed to create an output report that produces the maximum (and minimum) allowable number of table entries.
  • If internal program data structures have prescribed boundaries (e.g., an array has a defined limit of 100 entries), be certain to design a test case to exercise the data structure at its boundary.

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.

Robin Roy, PMP
Robin works as a Senior Consultant with Brilliance MSC, Malaysia. He loves to evaluate new technologies and implement the same. Believes in sharing knowledge.
Robin Roy
Robin works as a Senior Consultant with Brilliance MSC, Malaysia. He loves to evaluate new technologies and implement the same. Believes in sharing knowledge.

The Related Post

A few months ago, Dr. Rebecca Fiedler and I published BBST—Test Design. This third course completes the Black Box Software Testing (BBST) set. The other two courses are BB ST Foundations and BBST Bug Advocacy. This article offers some information about the series, the design of the series (and the underlying instructional theory) and why you might be ...
Exploring key competences that endow a good games tester In this article, I will explore what I feel are the most important skills and attributes of a good game tester, and what type of mindset is needed for games testing.  I believe a good game tester should have. This is based on my experience and ...
Gondola by TestArchitect is a low-code Test Automation solution for End-to-End Testing across Web, API, and Mobile Applications. Gondola builds upon the TestArchitect family’s already-powerful testing capabilities in many ways, including faster mobile and web testing as well as heightened support for mobile application testing. LogiGear Product Manager Thuc Nguyen delves into why LogiGear created ...
LogiGear Magazine September 2012 – Integrated Test Platforms
According to Associate Press (February 9, 2010, Yuri Kageyama, AP Business Writer), “Toyota is recalling 437,000 Prius and other hybrid vehicles worldwide to fix brake problem.” Toyota is the world’s largest automaker with impeccable quality reputation up to now.
If you want to enjoy your job and not worry about lack of resources, or have old, outdated strategies, with failing or meaningless test automation – get help!   We all know about globalization. Markets are global, products are global, mobile is global and software development is a global. As a result, the workforce is ...
Lab team brainstorming session Whether you work in engineering/product, operations, or even marketing, keeping your team trained and engaged with their work is a challenge that is universal for all managers. This is hard enough when your team is in-house, but what are you to do, when you have multiple teams to manage across different ...
LogiGear Magazine – February 2011 – The Exploratory Testing Issue
BrianBrian is a delivery-focused manager with a wealth of multi-disciplinary IT experience, the last fifteen years of which have been mainly in quality assurance and testing. He has been fortunate enough to work for some of the world’s largest companies using some of the latest technologies and tools.As well as being responsible for the day-to-day ...
Incorporate Exploratory Testing into your Test Strategy and find better bugs faster! Description: This two-day course is designed to give test engineers a global understanding of exploratory testing. From why we do it and its uses to how we do it and the value of measurement, Exploratory Testing will be examined and practiced to empower ...

Leave a Reply

Your email address will not be published.

Stay in the loop with the lastest
software testing news