What are the Black Box Testing Techniques

Black Box Testing Techniques

There are six types of black box testing techniques in software testing. Below are techniques in black box testing widely used.

Different Types of Black Box Testing Techniques

  1. Equivalence Partitioning
  2. Boundary Value Analysis
  3. Decision Table
  4. State Transition
  5. Error Guessing
  6. Graph-Based Testing Methods

1. Equivalence Partitioning

The equivalence Partitioning Method is also known as Equivalence class partitioning (ECP).

It is a black box testing techniques by which data is divided into classes or groups, and with the help of these classes of data, test cases can be made.

 Example:

Equivalence Partitioning

As present in the above image, an “AGE” text field accepts only the numbers from 18 to 60. There will be three sets of classes or groups.

Two invalid classes will be:

a) Less than or equal to 17.

b) Greater than or equal to 61.

One valid class will be anything between 18 to 60.

2. Boundary Value Analysis

This black box testing techniques used to test the data set according to the boundary condition.

From the name itself, we can understand that in this technique we focus on the values at the boundaries itself

In boundary value analysis both the valid inputs and invalid inputs are tested to verify the issues.

Example:

First, identify the boundary data then do the below things to find out the data by which we can test-

Invalid Boundary Check   {Min-1; Max+1}

Valid Boundary Check   {Min; Min+1; Max-1; Max}

If we want to test a field where values from 1 to 100 should be accepted then we choose the boundary values:

1-1, 1, 1+1, 100-1, 100, and 100+1.

Instead of using all the values from 1 to 100, we just use 0, 1, 2, 99, 100, and 101.

Boundary Value Analysis

3. Decision Table

The decision table is a tabular representation of several input values, cases, rules, and test conditions.

Testers can use decision table testing to test the results of several input combinations.

Example:

Login screen by Decision Base Table

The condition is simple if the user provides the correct username and password the user will be redirected to the homepage. If any of the input is wrong, an error message will be displayed.

Conditions

Rule 1

Rule 2

Rule 3

Rule 4

Username (T/F)

F

T

F

T

Password (T/F)

F

F

T

T

Output (E/H)

E

E

E

H

Legend:

  • T – Correct username/password
  • F – Wrong username/password
  • E – Error message is displayed
  • H – Home screen is displayed

Interpretation:

  • Test Case 1 – Username and password both were wrong. The user is shown an error message.
  • Test Case 2 – Username was correct, but the password was wrong. The user is shown an error message.
  • Test Case 3 – Username was wrong, but the password was correct. The user is shown an error message.
  • Test Case 4 – Username and password both were correct, and the user navigated to the homepage

This is the decision table technique in black box testing.

4. State Transition

State Transition Testing is a black box testing techniques that are used to test the different states of the application.

The state of the system changes depending on the conditions. Accordingly, the tester needs to test them.

Example:

State Transition Testing

Let’s see the diagram:

There is a login function of an application that provides a maximum three number of attempts, and after exceeding three attempts, it will be directed to an error page.

State Transition

State Transition Table:

STATE LOGIN VALIDATION REDIRECTED

S1

First Attempt

Invalid

S2

S2

Second Attempt

Invalid

S3

S3

Third Attempt

Invalid

S5

S4

Home Page

 

 

S5

Error Page

 

 

In the above state transition table, we see that state S1 denotes the first login attempt. When the first attempt is invalid, the user will be directed to the second attempt (state S2). If the second attempt is also invalid, then the user will be directed to the third attempt (state S3). Now if the third and last attempt is invalid, then the user will be directed to the error page (state S5).

But if the third attempt is valid, then it will be directed to the homepage (state S4).

5. Error Guessing

This is a classic example of Experience-Based Testing.

In this black box testing techniques, the tester can use his/her experience with the application behavior and functionalities to guess the error-prone areas.

Many defects can be found using error guessing techniques

Few common areas where we can use in error guessing:

  • Divide by zero.
  • Accepting the Submit button without any value.
  • File upload without attachment.
  • File upload with other extensions or files like PPT, PDF, etc.
  • File upload with less than or more than the limit size.

6. Graph Based Testing

Each and every application is a build-up of some objects. All such objects are identified and the graph is prepared.

From this object graph, each object relationship is identified and test cases are written accordingly.

Graph-Based Testing Methods

A “Cause” stands for a distinct input condition that fetches an internal change in the system.

An “Effect” represents an output condition, a system state that results from a combination of causes.

These are the widely used black box testing techniques in software testing.

Other Popular Articles

What is System Testing in Software Testing

Leave a Comment