In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "what are the advantages and disadvantages of black box testing, white box testing and gray box testing". Many people will encounter this dilemma in the operation of actual cases. next, let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
Black box test
The black box testing of the software means that the test should be carried out at the interface of the software.
This method regards the test object as a black box, and the tester does not consider the internal logical structure and internal characteristics of the program at all, but only according to the requirement specification of the program to check whether the function of the program conforms to its function description.
Therefore, black box testing is also called functional testing or data-driven testing.
To illustrate in a popular way:
Xiaoming enters from a certain entrance of the mall, and you wait outside the mall. You don't know what's going on inside the mall. You only know that the correct result is that Xiaoming comes out from an exit (which can be the same as the entrance) with a bunch of goods.
This is the original correct situation, if there is no mistake, we do not need to care about what happened in the mall, otherwise, during many visits to the mall (many black box tests), the original correct situation can not be achieved. For example, when Xiaoming disputes with people, Xiaoming has no money, Xiaoming needs to negotiate with himself, and so on, it needs to be checked by the tester.
White-box testing
The white-box testing of the software is a careful examination of the process details of the software.
This method treats the test object as an open box, which allows testers to use the logical structure and related information within the program to design or select test cases to test all logical paths of the program. Check the status of the program at different points to determine whether the actual state is consistent with the expected state.
Therefore, white-box testing is also called structural testing or logic-driven testing.
To illustrate in a popular way:
Xiaoming enters from a certain entrance of the mall, you accompany you into the mall, observe every detail of Xiaoming's shopping, understand every step he takes, every small situation that happens, and then, you hold a bunch of goods and accompany Xiaoming to come out from a certain exit.
Gray box test
Grey-box testing is between white-box testing and black-box testing.
It can be understood that gray-box testing is concerned about the correctness of the output to the input, as well as the internal performance, but this concern is not as detailed and complete as the white box, but only through some symbolic phenomena, events, signs to judge the internal running state, sometimes the output is correct, but the internal is actually wrong.
This situation is very common, and it will be very inefficient if you use the white-box test every time, so it is necessary to adopt such a gray-box approach.
The difference between Grey Box Test and Black Box Test
If a software contains multiple modules, when you use black box testing, you only need to care about the boundaries of the whole software system, and you do not need to care about the cooperation between the modules within the software system. If you use gray-box testing, you need to be concerned about the interaction between modules. This is the difference between gray box testing and black box testing.
The difference between Grey Box Test and White Box Test
However, in gray-box testing, you still don't need to care about the implementation details inside the module. For the internal modules of the software system, gray-box testing still treats it as a black box. White-box testing is different, but also need to further understand the implementation details of the internal module. So, this is the difference between gray box testing and black box testing.
The difference between black-box testing and white-box testing
Advantages of white-box testing
1. Be able to carefully consider the implementation of the software.
2. Each branch and path in the code can be detected.
3. Reveal the errors hidden in the code.
4. The testing of the code is more thorough.
Disadvantages of white-box testing
1. Expensive.
2. Unable to detect missing path and data sensitivity errors in the code
3. Do not verify the correctness of the specification.
Advantages of black box testing
1. For subsystems and even systems, the efficiency is higher than that of white-box testing.
2. Testers do not need to know the details of the implementation, including specific programming languages.
3. Testers and programmers are independent of each other.
4. Testing from the user's point of view, it is easy to understand and accept.
5. It helps to expose the inconsistency or ambiguity of the specifications.
6. The test case can be carried out immediately after the specification is completed.
Disadvantages of black box testing
1. Only a small part of the input has been tested, and it is almost impossible to test every possible input.
2. Without clear and concise specifications, it is difficult to design test cases.
3. If the tester is not informed of the use cases that the developer has executed, there will be unnecessary duplication of test data.
4. There are many program paths that have not been tested.
5. You cannot test directly against specific program segments, which may be complex and may hide more problems.
6. Most of the tests related to the research are directly aimed at the white-box testing.
This is the end of the content of "what are the advantages and disadvantages of black box testing, white box testing and gray box testing". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.