Black-box testing is a ‘software testing technique’ used to examine the functionality of the software. It doesn’t bother about the ‘internal structure’ of the software. We also refer to it as behavioural testing as it examines the behaviour of the software.
Black box testing analyzes different categories of errors by testing all the functions of the software. In this section, we will study more about black-box testing, its method of testing, and its techniques, along with its advantages and disadvantages.
Content: Black-Box Testing in Software Engineering
- What is Black Box Testing?
- How to Perform Black Box Testing?
- Example of Black Box Testing
- Techniques of Black Box Testing
- Types of Balck Box Testing
- Advantages & Disadvantages
- Key Takeaways
What is the Black-Box Testing?
Black box testing is behavioural testing that we employ to test the functionality of the developed software. We do this without going into the control structure of the software. Here, the testers derive all the possible input values for designing the test cases that would examine all the functions of the software.
The black box test is never an alternative to ‘white box testing’. Instead, it is a complementary approach. The white box testing examines the internal or the control structure of the software. However, the black box tests the functions of the software.
Let’s discuss what types of errors the black-box test identifies.
- As the black box tests the software’s functionality, it will discover all the functions that are missing in the software. Also, the functions that are implemented incorrectly.
- It also uncovers the errors that come across while using the interface.
- The test uncovers the errors faced in accessing the database.
- It discovers the errors that occur while initiating any function or while terminating any function.
- It also uncovers the error in the performance or behaviour of the software.
We implement the black box test at later stages of the testing schedule. Because it deals only with the functional information of the software. While testing with the black box techniques, the testers can answer the questions:
- What type of input values would lead to a good test case?
- How do we test the validity of the functions of the software?
- How to examine the performance of the software?
- To what type of values is the software perceptive?
- How the values to the input domain are bounded?
- What amount of data can the system accept?
Knowing this much, we will proceed to see the method to exercise the black box testing.
How to Perform Black-Box Testing?
To perform the black-box test, testers have to perform the following steps:
- For testing any software, the tester must understand the requirements specified by the customer while allotting the project. So, the first step is to analyze the requirements and specifications of the software.
- After reviewing the requirements, testers must select the set of valid input values that the system has to process. Also, the set of invalid input values that the system must detect as an error.
- The testers must also declare the desired output.
- The testers must now design test cases, execute them with the set of valid & invalid inputs and collect the generated output.
- Now, it’s time to compare the output generated by the system against the desired output.
- If testers detect any error, then they fix that error, and they start performing the test again.
Example of Black-Box Testing
Let us understand the black-box test with the help of an example. Consider we have to perform the black box test on the word processor.
So, the black box test will examine whether the word processor can manage files. The test cases would include whether:
- We can create a word document.
- Whether we can save the word document.
- We can open the already created documents,
- Delete word document.
Another test case would be testing editing tools like:
- Is it possible to find and select any word in the document?
- You can test whether you can change the font style and size in the document and so on.
While testing all this, the tester does not have to bother about the control structure of the word processor. The tester must not worry about how the developers implement the functions in the word processor or how they code it. Black-box testing has to examine whether all the functions and tools of the word processor are working properly or not.
Techniques of Black Box Testing
1. Graph-Based Testing Methods
In graph-based testing, initially, we identify all the objects that we modelled in the software. Then we have to identify the relationship between these objects.
Now, in the graph-based method, we have to create a graph that has nodes that represent the ‘objects’. The links between these nodes are the ‘relationship’ between these nodes.
Now, the testers identify a series of test cases and implement them on the graph. These test cases exercise all the objects and every possible relationship between them to uncover the errors.
2. Equivalence Partitioning
This technique of black-box testing divides the input fields of the program into categories. There can be many input values, and exercising all values while testing becomes a lengthy process.
So, we group the input values, and test representative input from each group. In this way, many inputs can be exercised at once.
3. Boundary Value Analysis
It is complementary to equivalence partitioning. In the equivalence partitioning, a representative from each input domain is exercised, but in boundary value analysis, the boundary values for each input domain are tested.
4. Orthogonal Array Testing
Sometimes, we have an application that requires minimum or limited inputs. In such cases, orthogonal array testing is implemented. As the input domains are limited, it is feasible to test all the possible input values from each input domain.
We also call orthogonal array testing as exhaustive testing, as it exhaustively checks all the input values from every input domain of the program.
Types of Balck Box Testing
Functional Testing
It focuses on testing the functional features of the software. Like testing the critical aspects of the software also the integration between the components of the software and the entire software.
Non Functional Testing
The non-functional testing focuses on testing the non-functional aspect of the software. Such as whether the software is:
- Simple and easy to understand.
- The software can perform under the expected and peak loads.
- The software is vulnerable to common security threats.
- Compatible to different kind of devices, browsers, operating systems, etc.
Regression Testing
We perform the regression testing when any kind of updation takes place in software. This testing checks whether the newly patched code does not affect the existing code.
Advantages & Disadvantages of Black Box Testing
Advantages
- The tester does not need to have knowledge of programming languages.
- Testing is done from the users’ point of view, so it becomes easy to identify missing functions and function errors.
- Testers do not worry about the control structure of the software.
Disadvantages
- The black box test does not uncover the errors of the control structure.
- The testers test only representative values from each input domain. It may be the case that some sensitive values are skipped or remain unchecked.
- As the testers with no programming language knowledge are allowed to test, it may be the case that they skip some technical test cases while testing.
Key Takeaways
- Black-box testing tests the functionality of the software.
- It has nothing to do with the internal structure of the software.
- We also call it as behavioural testing.
- We implement black box testing in the last stages of testing.
- It is complementary to white box testing.
- It derives all possible inputs along with their desired outputs and develops the test cases. These test cases are then executed. The generated outputs are tested against the desired output to uncover the errors.
- There are four black-box test techniques graph-based technique, equivalence partitioning, boundary value analysis and orthogonal array test.
So, this is all about the black box test, which only tests the functional behaviour of the software. It does not bother about the control structure of the software.
Leave a Reply