What is Black Box Testing?
Black box testing is defined as a testing technique in which functionality 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 BlackBox Testing we just focus on inputs and output of the software system without bothering about internal knowledge of the software program.
The above Black-Box can be any software system you want to test. For Example, an operating system like Windows, a website like Google, a database like Oracle or even your own custom application. Under Black Box Testing, you can test these applications by just focusing on the inputs and outputs without knowing their internal code implementation. Consider the following video tutorial-
Click here if the video is not accessible
How to do BlackBox Testing
Here are the generic steps followed to carry out any type of Black Box Testing.
- Initially, the requirements and specifications of the system are examined.
- Tester chooses valid inputs (positive test scenario) to check whether SUT processes them correctly. Als,o some invalid inputs (negative test scenario) are chosen to verify that the SUT is able to detect them.
- Tester determines expected outputs for all those inputs.
- Software tester constructs test cases with the selected inputs.
- The test cases are executed.
- Software tester compares the actual outputs with the expected outputs.
- Defects if any are fixed and re-tested.
Types of Black Box Testing
There are many types of Black Box Testing but the following are the prominent ones -
- Functional testing - This black box testing type is related to the functional requirements of a system; it is done by software testers.
- Non-functional testing - This type of black box testing is not related to testing of specific functionality, but non-functional requirements such as performance, scalability, usability.
- Regression testing - Regression Testing is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
Tools used for Black Box Testing:
Tools used for Black box testing largely depends on the type of black box testing you are doing.
- For Functional/ Regression Tests you can use - QTP, Selenium
- For Non-Functional Tests, you can use - LoadRunner, Jmeter
Black Box Testing Techniques
Following are the prominent Test Strategy amongst the many used in Black box Testing
- Equivalence Class Testing: It is used to minimize the number of possible test cases to an optimum level while maintains reasonable test coverage.
- Boundary Value Testing: 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.
- Decision Table Testing: A decision table puts causes and their effects in a matrix. There is a unique combination in each column.
Comparison of Black Box and White Box Testing:
|Black Box Testing||White Box Testing|
|the main focus of black box testing is on the validation of your functional requirements.||White Box Testing (Unit Testing) validates internal structure and working of your software code|
|Black box testing gives abstraction from code and focuses on testing effort on the software system behavior.||To conduct White Box Testing, knowledge of underlying programming language is essential. Current day software systems use a variety of programming languages and technologies and its not possible to know all of them.|
|Black box testing facilitates testing communication amongst modules||White box testing does not facilitate testing communication amongst modules|
Black Box Testing and Software Development Life Cycle (SDLC)
Black box testing has its own life cycle called Software Testing Life Cycle (STLC) and it is relative to every stage of Software Development Life Cycle of Software Engineering.
- Requirement - This is the initial stage of SDLC and in this stage, a requirement is gathered. Software testers also take part in this stage.
- Test Planning & Analysis - Testing Types applicable to the project are determined. A Test Plan is created which determines possible project risks and their mitigation.
- Design - In this stage Test cases/scripts are created on the basis of software requirement documents
- Test Execution- In this stage Test Cases prepared are executed. Bugs if any are fixed and re-tested.