What Is Black Box Testing
What Is Black Box Testing
By treating it as a Black Box, we mean that the system or source code is not checked at all. It is done from the customers viewpoint. The test engineer engaged in Black Box testing only knows the set of inputs & expected outputs & is unaware of how those inputs are transformed into outputs by the software. What is White Box Testing: White box testing is a way of testing the external functionality of the code by examining and testing the program code that realizes the external functionality. It is a methodology to design the test cases that uses the control structure of the application to design test cases. White box testing is used to test the program code, code structure and the internal design flow
Black Box Testing or Functional Testing White Box Testing or Glass Box Testing or Structural Testing
This method focus on functional requirements of the software, i.e., it enables the software engineer to derive sets of input conditions that will fully exercise all functional requirements for a program. It is Not an alternative approach to white box technique rather is complementary approach that is likely to uncover a different class of errors. Black box testing is applied during later stages of testing. It attempts to find errors in following categories : a) Incorrect or missing functions b) Interface errors c) Errors in data structures or external database access d) Performance errors e) Initialization and termination errors.
Whereas, white box testing is performed early in the testing process. Whereas, white box testing attempts errors in following cases a) Internal logic of your program. b) Status of program.
control structure of our program, we do not consider here). 6 Black box testing, broadens our focus, on the information domain and might be called as "testing in the large' i.e., testing bigger monolithic programs. Using black box testing techniques, we derive a set of test cases that satisfy following criteria a) Test cases that reduce, (by a count that is greater than 1), the number of additional test cases that must be designed to achieve reasonable testing. b) Test cases that tell us something about the presence or absence of classes of errors rather than an error associated only with the specific tests at hand.
cases. White box testing, as described by Hetzel is "testing in small" i.e., testing small program components (e.g., modules or small group of modules). Using white box testing, the software engineer can desire test cases that a) Guarantee that all independent paths within a module have been exercised at least once. b) Exercise all logical decisions on their true and false sides. c) Execute all loops at their boundaries and within their operational bounds. d) And exercise internal data structures to ensure their validity.
8 9
It includes the tests that are conducted at A close examination of the software interface. procedural detail is done. Are used to uncover errors. Logical paths through the software are tested by providing test cases that exercise specific sets of conditions or loops. A limited set of logical paths be however examined.
10
To demonstrate that software functions are operational i.e., input is properly accepted and output is correctly produced. Also, the integrity of external information (e.g. database) is maintained.
Top down Testing: In this approach testing is conducted from main module to sub module. if the sub module is not developed a temporary program called STUB is used for simulate the submodule. Advantages:
- Advantageous if major flaws occur toward the top of the program. - Once the I/O functions are added, representation of test cases is easier. - Early skeletal Program allows demonstrations and boosts morale. Disadvantages: - Stub modules must be produced - Stub Modules are often more complicated than they first appear to be. - Before the I/O functions are added, representation of test cases in stubs can be difficult. - Test conditions ma be impossible, or very difficult, to create. - Observation of test output is more difficult. - Allows one to think that design and testing can be overlapped. - Induces one to defer completion of the testing of certain modules. Bottom up testing: In this approach testing is conducted from sub module to main module, if the main module is not developed a temporary program called DRIVERS is used to simulate the main module. Advantages: - Advantageous if major flaws occur toward the bottom of the program. - Test conditions are easier to create. - Observation of test results is easier. Disadvantages: - Driver Modules must be produced. - The program as an entity does not exist until the last module is added. Structural testing is considered white-box testing because knowledge of the internal logic of the system is used to develop test cases. Structural testing includes path testing, code coverage testing and analysis, logic testing, nested loop testing, and similar techniques. Unit testing, string or integration testing, load testing, stress testing, and performance testing are considered structural. Functional testing addresses the overall behavior of the program by testing transaction flows, input validation, and functional completeness. Functional testing is considered black-box testing because no knowledge of the internal logic of the system is used to develop test cases. System testing, regression testing, and user acceptance testing are types of functional testing. Both methods together validate the entire system. For example, a functional test case might be taken from the documentation description of how to perform a certain function, such as accepting bar code input. A structural test case might be taken from a technical documentation manual. To
effectively test systems, both methods are needed. Each method has its pros and cons, which are listed below: Structural Testing Advantages The logic of the softwares structure can be tested. Parts of the software will be tested which might have been forgotten if only functional testing was performed. Disadvantages Its tests do not ensure that user requirements have been met. Its tests may not mimic real-world situations. Functional Testing Advantages Simulates actual system usage. Makes no system structure assumptions. Disadvantages Potential of missing logical errors in software. Possibility of redundant testing.