Black box testing technique

Tram Ho

Define:

Black box testing is also called behavioral testing, opaque box, closed box, visual or specification-based testing.

This is a Software Testing method that analyzes the functionality of the software / application without knowing much about the internal structure / design of the product being tested and compares the input value with the output value.

 

This test occurs during the software development process and the software testing life cycle, i.e. during the unit tests, integration tests, system tests, and acceptance tests. (Accept) and Regression Testing.

Types of black box testing

In fact, there are several types of Black Box testing that are possible, but if we look at its main variants, here are two basic types:

1) Functional testing:

Functional testing comes to the functional requirements or specifications of an application. In this test, various actions or functions of the system are being tested by providing the input and comparing the actual output with the expected output. Example: When checking a dropdown list, we click on it and verify that it will expand and all expected values ​​will show in the list. Some main types of Functional Testing:

  • Smoke Testing
  • Sanity Testing
  • Integration Testing
  • System Testing
  • Regression Testing
  • User Acceptance Testing

2) Non-functional test:

In addition to functional requirements, there are a number of non-functional aspects that are also required to be tested to improve product quality and performance. Some of the main types of non-functional testing include:

  • Usability Testing
  • Load Testing
  • Performance Testing
  • Compatibility Testing
  • Stress Testing
  • Scalability Testing

Black box testing techniques

Equivalence Partition:

This technique is also known as partition equivalent (ECP). In this technique, the input values ​​for the system or application are divided into different classes or groups based on the similarity of the output. Therefore, instead of using each input value, we can now use any value from the equivalent group / class to check the results. In this way, we can maintain the scope of the test but minimize the workload and most importantly the working time. For example: As shown in the picture above, an “AGE” text field only accepts numbers 18 to 60. There will be three equivalent partitions or groups. The two invalid classes will be: a) Less than or equal to 17. b) Greater than or equal to 61. A valid class will be any number between 18 and 60. Therefore, we have reduced the test cases. There are only 3 cases based on the formed classes that still cover all possibilities. So experimenting with any value from each set of the class is enough to test the above scenario.

Boundary Value Analysis:

From the name itself, we can understand that in this technique, we will focus on values ​​at the boundaries because it is found that many applications have a large number of problems occurring at the boundary. Margins mean values ​​near the limit that the behavior of the system changes. In the boundary value analysis both valid and invalid inputs are tested to verify the problems. For example: If we want to test a field in which values ​​from 1 to 100 must be accepted then we select the boundary values: 1-1, 1, 1 + 1, 100-1, 100 and 100 + 1. Replace Because using all values ​​from 1 to 100, we only use 0, 1, 2, 99, 100 and 101.

Decision Table Testing:

As the name itself suggests, wherever there is a logical relationship such as:

If {(Condition = True) then act1; } other actions2; / (condition = False) /

The tester then determines two outputs (action1 and action2) for the two conditions (True and False). Therefore, based on probable scenarios, a Decision table is created to prepare a set of test cases. For example: Take an example of XYZ Bank, which provides interest rates for High-class Citizens to 10% and to the remaining 9%. In this example condition, C1 has two values ​​that are true and false, condition C2 also has two values ​​that are true and false. The total number of possible combinations would then be four. In this way, we can draw test cases using the decision table.

State transition map (State Transition Testing)

State transition diagram is a technique used to check the different states of the system. The status of the system varies according to conditions or events. Events that trigger states become scripts and testers need to check them.

A state transition diagram provides a clear view of state changes but is only effective for simple applications. More complex projects can lead to more complex state transition diagrams thus making it less efficient. For example:

Error Guessing

This is a classic example of experience-based testing.

In this technique, testers can use their experience of application behavior and functions to guess error-prone areas. Many bugs can be found by guessing the error in which most developers make mistakes.

Some common errors that developers often forget to handle:

Divide by zero. Handling null values ​​in text fields. Accept the Submit button without entering a value. Upload files without attachments. Upload files with less or more than the limit size.

Advantages and disadvantages

Advantages:

With black box testing, testers do not need a technical background. It is important to consider yourself as a user and think from the user’s perspective. Testing can be started as soon as the project / application development process is implemented. Both testers and developers work independently without interfering with each other’s space. Black box testing is more effective for large and complex applications. Defects and inconsistencies can be identified at an early stage of testing.

Defect:

Because the test person does not have any technical or programming knowledge, it is possible to ignore the possible conditions of the script to be tested. It is difficult to write a test script because all the inputs are needed, and there is a lack of time for this collection. For large and complex projects, it is not possible to fully examine them

Difference between white box test and black box test

Test white boxTesting black box
Testers do not need knowledge of the programming or internal structure of the applicationTesters need knowledge of the programming or internal structure of the application
This is done at a later stage of development, such as functional testing.Performed at an early stage of development, such as functional testing (Unit Testing, Integration Testing)
Focus on the functionality of the system to be testedFocus on the program code and its syntax
Documents requiring specification are requiredDesign documents with flowcharts, flowcharts, etc. are required
Made by testerThis is done by a programmer or tester with a programming knowledge

Conclude

Above are some basic points related to black box testing and an overview of its techniques and methods.

The fact that we can’t test everything manually with 100% accuracy, if the techniques and methods mentioned above are used effectively, it will definitely improve the quality of the system. Overall this is a very useful method to verify the functionality of the system and identify most of the errors contained in the product.

Hopefully the article will help you gain in-depth knowledge about the Black Box Testing technique.

Reference: https://www.softwaretestinghelp.com/black-box-testing/

Share the news now

Source : Viblo