Thursday, July 23, 2009

Black Box Testing

Black box testing takes an external perspective of the test object to derive test cases. These test cases can be functional or non-functional. Usually functional test cases are called Black box testing. The test designer selects positive and negative cases and determines the adequate output. There is no information of the test object's internal formation.

1. Testing Strategies/Technique

* Black box testing should make use of randomly generated inputs, to eliminate any guess work by the tester as to the methods of the function.
* Data outside of the specified input range should be tested to check the robustness of the system.
* Boundary cases should be tested (top and bottom of specified range) to make sure the highest and lowest allowable inputs produce proper output
* The number zero should be tested when numerical data is to be input
* Stress testing should be performed, especially with real time systems
* Crash testing should be performed to see what it takes to bring the system down
* Test monitoring tools to track which tests have been performed and the outputs of these tests, to avoid repetition and to help in the software maintenance
* Other functional testing techniques include: Transaction testing, Syntax testing, Domain testing, Logic testing, and State testing.
* Finite state machine models can be used as a guide to design functional tests

2. Black Box Testing Strategy:

Black Box Testing is not a type of testing; it is a testing strategy. As the name "black box" indicates, no knowledge of internal logic or code structure is required. The types of testing under this strategy are totally based/focused on the testing for requirements and functionality of the work product/software application. Black box testing is sometimes also named as "Opaque Testing", "Functional/Behavioral Testing" and "Closed Box Testing".


The base of the Black box testing strategy lies in the selection of appropriate data as per functionality and testing against the functional specifications. It is becoming common to handle the Testing work to a third party as the developer of the system knows about the internal logic and coding of the system.

In order to implement Black Box Testing Strategy, the tester is needed to be thorough with the requirement specifications of the system and as a user, should know, how the system should behave in response to the particular action.

Various testing types that fall under the Black Box Testing strategy are: functional testing, stress testing, recovery testing, volume testing, User Acceptance Testing (also known as UAT), system testing, Sanity or Smoke testing, load testing, Usability testing, Exploratory testing, ad-hoc testing, alpha testing, beta testing etc.

These testing types are again divided in two groups

a) Testing in which user plays a role of tester and

b) User is not required.


3. Advantages

More effective on larger units of code.

Tester needs no knowledge of implementation.

Tester and programmer are independent of each other.

Tests are done from a user's point of view.

Will help to expose any ambiguities in the specifications

Test cases can be designed as soon as the specifications are complete.


4. Disadvantages

Only a small number of possible inputs can actually be tested.

Without clear and concise specifications, test cases are hard to design.

There may be redundant 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.

No comments: