Sunday, January 18, 2009

Black Box Testing

Black Box OR Behavioral OR Functional OR Opaque-box OR Closed-box Testing

"It is a method of testing in which one will perform testing only on the functional part of an application with out having any structural knowledge. Usually test
engineers perform it."

"Testing software without any knowledge of the back-end of the system, structure or language of the module being tested. Black box test cases are written from a definitive source document, such as a specification or requirements document."

"Black box is a test design method. Black box testing treats the system as a "black-box", so it doesn't explicitly use Knowledge of the internal structure. Or in other words the Test engineer need not know the internal working of the “Black box”."

Who does black box testing?

Testers
Business Analysis
Clients

When you do?

Once the functionality is developed

Why not by developers?

Very difficult to break one’s own code
To test the software from end-user perspective
Fresh eyes always help

Blck Box Testing Techniques are:

1) Equivalence Partitioning
2) Boundary Value analysis
3) Error Guessing.

4) Graph Based Testing Methods Technique
5) Comparison Testing Technique
6)Orthogonal Array Testing Technique
7) Specialized Testing technique

First 3 techniques are the most often used for black box testing.

Black Box focuses on the functionality part of the module.

Some people like to call black box testing as behavioral, functional, opaque-box, and closed-box. While the term black box is most popularly use, many people prefer the terms "behavioral" and "structural" for black box and white box respectively. Behavioral test design is slightly different from black-box test design because the use of internal knowledge isn't strictly forbidden, but it's still discouraged.

Personally we feel that there is a trade off between the approaches used to test a product using white box and black box types.There are some bugs that cannot be found using only black box or only white box. If the test cases are extensive and the test inputs are also from a large sample space then it is always possible to find majority of the bugs through black box testing.

Tools used for Black Box testing:
Many tool vendors have been producing tools for automated black box and automated white box testing for several years. The basic functional or regression testing tools capture the results of black box tests in a script format. Once captured, these scripts can be executed against future builds of an application to verify that new functionality hasn't disabled previous functionality.

Advantages of Black Box Testing

- Tester can be non-technical.
- This testing is most likely to find those bugs as the user would find.
- Testing helps to identify the vagueness and contradiction in functional specifications.
- Test cases can be designed as soon as the functional specifications are complete
- More effective on larger units of code than glass box testing
- Tester needs no knowledge of implementation, including specific programming languages
- Tester and programmer are independent of each other
- Tests are done from a user's point of view
- Will help to expose any ambiguities or inconsistencies in the specifications
- Test cases can be designed as soon as the specifications are complete

Disadvantages of Black Box Testing

- Chances of having repetition of tests that are already done by programmer.
- The test inputs needs to be from large sample space.
- It is difficult to identify all possible inputs in limited testing time. So writing test cases is slow and difficult
Chances of having unidentified paths during this testing
- Only a small number of possible inputs can actually be tested, to test every possible input stream would take nearly forever
- Without clear and concise specifications, test cases are hard to design
- There may be unnecessary repetition of test inputs if the tester is not informed of test cases the programmer has already tried
- May leave many program paths untested
- Cannot be directed toward specific segments of code which may be very complex (and therefore more error prone)
- Most testing related research has been directed toward glass box testing

No comments:

Post a Comment