Black Box Testing – Introduction :
Black-Box Testing Involves tests based upon specifications requirements and functionality. For Black Box testing, the software tester need not have any knowledge of internal design of the software or its code being tested. Due to this reason, the tester and the programmer can be independent of each other, avoiding programmer bias toward his own work.
During black box testing, the tester would only know the “legal” inputs and what the expected outputs should be, but he need not know as to how the program actually arrives at those outputs.
Due to the nature of black box testing, the test planning can begin as soon as the specifications are written.
Testing Strategies / Techniques For Black Box Testing:
($) Black box testing should make use of randomly generated inputs (only a test range should be specified by the tester), 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 program.
($) 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 (try to overload the program with inputs to see where it reaches its maximum capacity).
($) Crash testing should be performed to see what it takes to bring the system down.
($) Test monitoring tools should be used whenever possible to track which tests have already been performed and the outputs of these tests to avoid repetition and to aid in the software maintenance.
($) Finite state machine models can be used as a guide to design functional tests.
Management of the Input Data :
When creating test cases for black-box testing, the data being input is very critical. Following are the three successful techniques for managing the amount of input data:
1) Equivalence Partitioning
An equivalence class is a subset of data which is representative of a larger class. Equivalence partitioning is a technique for testing equivalence classes rather than undertaking exhaustive testing of each value of the larger class.
For example, a program intended to edits credit limits within a given range (Say 1,000 – 1,500) would have three equivalence classes:
1. < 1,000 (invalid)
2. Between 1,000 and 1,500 (valid)
3. > 1,500 (invalid)
2) Boundary Analysis
A technique which consists of developing test cases and data which focuses on the input and output boundaries of a given function.
Boundary analysis would test as under when referred to the above mentioned example of credit limit:
1. Low boundary +/- one (999 and 1,001)
2. On the boundary (1,000 and 1,500)
3. Upper boundary +/- one (1,499 and 1,501)
3) Error Guessing
Test cases can be developed based upon the intuition and experience of the tester.
For example, in an example where one of the inputs is the date, a tester may try February 29, 2000
Advantages of Black Box Testing:
($) 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:
($) Only a small number of possible inputs can actually be tested, to test every possible input stream would take extremely longer time.
($) Test cases are difficult to design without clear and concise specifications.
($) There may be unnecessary repetition of test inputs if the tester is not informed of test cases which 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)
Many More Articles on Types of Testing
Black Box testinng also known as Behavioral Testing, is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester. This type of testing is based entirely on the software requirements and specifications.You have explained it in detailed way about it. Keep writing.!