BLACK BOX TESTING is defined as a dynamic testing technique in which of the Application Under Test (AUT) is tested without looking at the internal code structure, implementation details and knowledge of internal paths of the software.

This type of testing is based entirely on software requirements and Specifications. In Black Box Testing have just focus on inputs and output of the software system without bothering about internal knowledge of the software. this also known as functional testing.

In this technique, based on function requirements, test cases are designed, input test data is given to the system and results are checked against expected outputs after executing the software.

BLACK BOX TESTING
  • Save

It helps to find errors in the following categories:

  • to test module independently
  • to test the functional validity of the software so that incorrect or missing functions can be recognized.
  • to look for interface errors
  • to test the maximum load or stress on the system to test the system behaviour and check its performance
  • to test the software such that the user/customer accepts the system within defined acceptable limits

Black box Testing Techniques (Methods):

Boundary Value Analysis (BVA):

The objective of any test case is to have maximum coverage and capability to discover more and more errors. It has been observed that test cases designed with boundary input values have a high chance to find more errors. Boundary value testing is focused on the values at boundaries.

This technique determines whether a certain range of values are acceptable by the system or not. It is very useful in reducing the number of test cases. It is most suitable for the systems where an input is within certain ranges. E.g. systems having requirements of minimum or maximum temperature, pressure or speed. It is not useful for Boolean variables.

What are boundary values?

The different variables of module under testing having different range. The upper and
lower value of that range is known as boundary value. The boundary values can be of three different types as shown in figure. Let us consider that there is a variable A which lies between 1 to 10.

In this case, the boundary values are as given below:

Values lying on the boundary are: lower boundary=l and upper boundary=10

• Value just above the boundary (Lower side) = 2

• Values just below the boundary (Upper side) =9

During test case designing, we consider single fault assumption.

Single fault assumption Holding the values of all but one variable at their nominal value and letting that variable assume extreme value. In other word, if there are n variables, then at a time only one variable can take its extreme (boundary) value and others at nominal.

 Boundary Value Checking (BVC):

In this method. the test cases are designed by holding one variable as its extreme value. These extreme ends like Start- End, Lower- Upper, Maximum – Minimum”.

The basic idea in boundary value testing is to select input variable values at their extreme as:

  • Minimum value(Min)
  • Value Just above the minimum value (Min)
  • Value Just below the maximum value(Max’)
  • Maximumn value(Max)
  • Nominal value(Nom)

Example 1: A program reads an integer number(N) within the range [1,100] and determines whether it is a prime number or not. Design test cases for this program using BVC testing metho.

Solution: Instead of checking, one value for each input, we will check the values at the boundary

values like:

Here, total number of variables (n)=1

Total test cases designed will be 4*n+1 = 4*1+1 = 5.

If we consider all the above combinations with nominal values, then test cases can

designed: Amin, Amin , Amax, AmaxAnom

 Robust Testing Method:

It is an extension of BVC method. It also checks the behaviour of a module for invalid input value (moving beyond the valid input range) by adding two additional boundary values like:

  • A value just above the maximum value(Max+)
  • A value just below the minimum value(Min-) For n input variables module, 6n+I test cases can be designed using this method.
  • This method has the desirable property that it forces attention on exception handling.
Worst-Case Testing Method:

BVC uses the critical fault assumption and therefore only tests for a single variable at a time assuming its extreme values. By disregarding this assumption we are able to test the outcome if more than one variable were to assume its extreme value (Rejecting single fault assumption). In other word this method is an extension of BVC by assuming more than one variable on the boundary.

This method is more thorough form of testing and it requires more efforts as it generates more test cases.

For n input variables in a module, 5″ test cases can be designed using this method.

Example 1: A program reads an integer number(N) within the range [1,100| and determines whether it is a prime number or not. Design test cases for this program using worst case testing method.

Since there is one variable, the total number of test cases will be 5 Therefore, the number of test cases will be same as BVC. Refer BVC method.

 Robust Worst-Case Testing Method:

The worst-case method is extended by considering extreme values for every possible input variable & it is known as Robust Worst-Case testing method. It can be generalized that for n input variables in a module, 7″ test cases can be designed using this method.

Equivalence Class (EVC) testing method:

As we know that input domain for testing is too large, so we can divide or based on common feature or a class of data. In this method, the input and the output domain is partitioned into mutually exclusive parts called equivalence classes.

These classes are identified such that each member of the class causes the same kind processing and output to occur. Any one sample from a class is representative of entire class. Thus instead of testing every input, only one test case from each class can be executed and will be sufficient to find error.

Following are the advantages of this method:

  • Without executing all test cases, it test complete testing domain.
  • It reduces redundant test cases.
  • It reduced total number of test cases.
  • It reduces time for testing.
  • It reduces testing cost.
  • It requires less resource.

This method is used by performing following two steps:

1. Identifying equivalence classes

By assumption that is if the specification require exactly the same behaviour for each Element in a class of values, then the program is likely to be considered such that it correct or fail for each element in that class.

By considering each input and output conditions and partitioning it, two types of classes can always be identified as:

  1. Valid equivalence class. The class considers all valid inputs
  2. Invalid equivalence class. The class considers all invalid input

Guidelines for forming equivalence classes:

If the entire range of an input won’t be treated in the same manner then the range should be split into 2 or more classes. e.g. a[1,10] then class=fa<0},{a<1} {a>10} and valid class={l<=a<=10} If program handles each valid input differently then define one valid class per input.

e.g {l<sax=10} {1<=b<=10} (1<=c<=10} {a>b, a>c,b#c} Boundary value analysis can help in identifying the classes.

e.g. O<=a<=10 then, one valid class(0<a<10) & two invalid classes can be design(a<0 and a>10)

  • If input variable can identify more than one category then for each category, we can make equivalence class. e.g. if input is character then we can make three valid classes as it can be number, alphabet or special characters.
  • For range design one valid class where input must be between the range, one invalid class where few invalid inputs, one invalid class where more invalid inputs.
  • E.g. requirements is maximum for 4 items order can be placed, classes are: one valid class(1<=item<-4), one invalid class(item>4) and one invalid class(item<l) If input condition specifies ‘must be’ situation( first character must be capital or letter). identify a valid class(it is capital/letter) and an invalid class( not capital/letter).
  • Classes can be of the output desired in the program.
  • Look for membership of an input condition in a set and identify valid and invalid class.

E.g. (valid code is HR.AP or WB then one valid class for each code and one invalid class for none of these) If input match a set of values and each case will deal with differently, identify valid class for each element and only one invalid class for values outside the set. Ep discount code for preferred customer is P. R for reduced rate or N for none then valid class code-P, valid class code-R. valid class code-N and invalid class code is none of P,R nor N.

If an element of a class will be handled differently than the others, divide the class to create class with only these elements and class with none of these elements.

E.g. Bank account balance may be from Rs.0 to Rs 10lakh and balance of Rs 1000 or more, no service charges then valid class:

valid

class: 1000<-balance<-=10lakh, invalid class: balance>10lakh

  1. Design test cases using equivalence classes

Guidelines for designing test cases are:

Assign a unique identification number to each equivalence class. Write a new test case covering as many of the uncovered valid equivalence classes until all valid classes have been covered. Write a test case that covers, one and only one of the uncovered equivalence classes. until all invalid classes have been covered.

FOLLOW ON TWITTER

NEW POST

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *