Black Box Testing! Why Need of Black Box Testing? Know More About Black Box Testing

Black Box Testing! Why Need of Black Box Testing? Know More About Black Box Testing

Black box testing refers to testing which involve only observation of the output for certain input values and there is no attempt to analyse the code which produces the output. The internal structure of the program is ignored. For this reason, black box testing is sometime referred to as functional testing in which content of black box is not known and the function of black box is understood completely in terms of its input and output.

In this, the tester only knows the input that can e given to the system and what output the system should give. In other words, the basis for deciding test cases is the requirement of the systems.

Black Box Testing! Why Need of Black Box Testing

Black box testing identifies following types of error:-

  1. Incorrect or missing function
  2. Interface error
  3. Error in data model
  4. Error in access to external data structure
  5. Performance error
  6. Initialisation and termination error

During Black box testing, test cases are designed to test the software systematically. Each of test case consist of input value, expected output and actual output obtained.

What is Manual testing| Goals of Manual Testing

Black box testing techniques are:-

  1. Equivalence class testing
  2. Boundary value analysis
  3. Decision tale based testing
  4. Cause effect graphs

Equivalence class testing:-

Equivalence portioning is a Black box testing strategy that partitions the info space of a program into classes of information from which test cases can be determined. These classes are known as equivalence class. In an equivalence class, each member of class behaves in similar fashion so testing the code with any one value belonging to an equivalence class is good as testing the software with any other value belonging to that equivalence class. So the output of testing for different values within a equivalence class will be similar.

Test case design for equivalence portioning is based on evaluation of equivalence class for input condition. A equivalence class represents a set of valid and invalid states for input conditions. An input condition is a specific numeric value, a range of value, a set of related values.

White Box Testing! Why we Need of White Box Testing? Know More About White Box Testing

It can be defined according to following guidelines:-

  1. If an input condition specifies a range, one valid and invalid classes are defined.
  2. If an info condition requires a particular esteem, one legitimate and two invalid proportionality classes are characterized.
  3. If an info condition determines an individual from a set, one substantial and one invalid comparability class are characterized.
  4. If an info condition defines Boolean, one valid and one invalid class are defined.

Test cases are selected so that the largest number of attribute of an equivalence class are exercised at once.

 

Boundary value analysis:-

A greater number of errors tend to occur at the boundaries of input domain then in the centre. It is

For Example:- For a function that computes the square root of integer values in the range from 1 to 5000. The test cases must include the following values 0,1,1,5000, 5001. Rather than focusing on input condition, boundary value analysis derived test cases for the output domain as well.

Guideline for boundary value analysis:-

  1. If an input condition specifies a range bounded by values A and B. Test cases should e designed with values A and B, just above and just below respectively.
  2. If an info condition determines various esteems, test cases ought to be produced that activity least and most extreme number esteems only above beneath, min and max are tried.
  3. Apply guidelines 1 and 2 to output condition also.
  4. If internal program data structure have prescribed boundaries.

Decision table based testing:-

Decision table based testing is used where there is a complex logical relationship between the input data. A decision table is used to build a complete set of test cases without using the internal structure of a program.

The values which are in the condition entry column are called inputs and the values which inside the action entry position are called output. Outputs are calculated on the basis of input and program specification.

 

Cause effect graphing technique:-

A weakness of equivalence partitioning and boundary value analysis is that they don’t consider combination of input. Cause effect graphing is a method that aides in choosing blends of info conditions in a precise way so number of experiments don’t turn out to be expansive. This procedure begins with recognizing circumstances and end results of the framework under testing.

A cause is a distinct output condition. After identifying the cause and effect, for each effect we identify the causes that can produce that effect and how the causes have to be combined to make the effect true. Causes are combined using Boolean operator AND, OR, NOT.

Black Box Testing! Why Need of Black Box Testing? Know More About Black Box Testing

Steps:-

  1. Cause and impact are recorded for a module and an identifier is relegated to each.
  2. A cause effect graph is developed.
  3. The graph is transformed into a decision table
  4. Decision table rules are converted to test cases.

 

Advantages

  1. The test is unbiased because the designer and testers are independent to each other
  2. The tester doesn’t need knowledge of any specific programming language
  3. The test is done from the point of view of the user not the designer
  4. Test cases are designed as soon as the specification are completed.

Disadvantages

  1. Without clear and concise specification test cases are very difficult to design
  2. Only a small number of possible input can be actually tested.
  3. Cant be directed towards specific segments of code which may be very complex and therefore more error prompt.
  4. May leave many program path untested.

Leave a Comment