Difference between black box testing and white box testing
Black box
testing is also called functional testing or data-driven testing. It is to test whether each function can be used normally when the functions that the product should have are known. During the test, the program is regarded as a black basin that cannot be opened. Without considering the internal structure and internal characteristics of the program, the tester tests the program interface. It only checks whether the program functions are used normally according to the requirements specification, whether the program can properly receive input data and generate correct output information, and maintain the integrity of external information (such as databases or files). The main black box testing methods include equivalence class partitioning, boundary value analysis, cause-effect diagrams, error speculation, etc., which are mainly used for software confirmation testing. The "black box" method focuses on the external structure of the program, does not consider the internal logical structure, and tests the software interface and software functions. The "black box" method is an exhaustive input test. Only by using all possible inputs as test cases can all errors in the program be found in this way. In fact, there are infinite test cases. People not only have to test all legal inputs, but also those illegal but possible inputs.
White box testing
White box testing is also called structural testing or logic-driven testing. It knows the internal working process of the product. It can be used to test whether the internal actions of the product are carried out normally according to the provisions of the specification manual. According to the internal structural test program of the program, it is checked whether each path in the program can work correctly according to the predetermined requirements, regardless of its function. The main methods of white box testing are logic-driven and base path testing, which are mainly used for software verification.
The "white box" method fully understands the internal logical structure of the program and tests all logical paths. The "white box" method is an exhaustive path test. When using this solution, the tester must check the internal structure of the program, start from checking the logic of the program, and obtain test data. The number of independent paths running through the program is astronomical. But even if every path is tested, there may still be errors. First, exhaustive path testing can never find out that the program violates the design specifications, that is, the program itself is a wrong program. Second, exhaustive path testing cannot find errors in the program due to missing paths. Third, exhaustive path testing may not find some data-related errors.
Software developers use white box testing methods to check program modules as follows: – Test all independent execution paths of program modules at least once; – Test all logical decisions at least once for both “true” and “false” situations; – Execute loop bodies within loop boundaries and running limits; – Test the validity of internal data structures, etc. Specific logical coverage includes: – Statement coverage – Decision coverage – Condition coverage – Decision-condition coverage – Condition combination coverage – Path coverage. White Box Testing Technology : Testing at the code level. This technology is used to find problems at the earliest and has the best effect. The main feature of this technology is that the test object enters the code. According to the developer’s familiarity with the code and the program, the necessary parts are tested. During the software coding stage, the software testing conducted by the developer based on his understanding and contact with the code is called white box testing. This stage of testing is mainly conducted by software developers. Xunit series tools are used on the JAVA platform for testing. Xunit testing tools are class-level testing tools that test each class and the methods of the class. Black Box Testing Technology : The content of black box testing mainly includes the following aspects, but the main part is still the functional part. It mainly covers all functions and can be combined with compatibility and performance testing. According to software requirements, design documents, simulate customer scenarios and conduct actual tests with the system. This testing technology is the most used testing technology and covers all aspects of testing. The following aspects can be considered: c Correctness: calculation results, naming, etc. d Usability: whether the software requirements can be met. e Boundary Condition: The boundary value of the input part, that is, the equivalent class division mentioned in general books, try the maximum, minimum and illegal data, etc. f Performance: The time required for the system to complete a task during normal use, and the response time is within an acceptable range when multiple people use it at the same time. The system implemented by J2EE technology needs to be taken care of in terms of performance. The general principle is that less than 3 seconds is acceptable, 3-5 seconds is acceptable, and more than 5 seconds affects ease of use. If performance problems are found during the test, it is very difficult to fix them, because this often means that the program's algorithm is not good, the structure is not good, or there is a problem with the design. Therefore, at the beginning of product development, the performance of the software should be considered . g Stress test (Stress): In the case of multiple users, you can consider using stress testing tools. It is recommended to combine stress and performance testing. If there is load balancing, you should also open monitoring tools on the server side to check the server CPU usage, memory usage, and if necessary, you can simulate a large amount of data input, the impact on the hard disk, and other information. If necessary, performance optimization must be performed (software and hardware can be used). The stress test here targets certain functions. h Error recovery (Error Recovery): Error handling, page data verification, including sudden power outages, dirty data input, etc. i Security test (Security): This field is under research. Firewalls, patch packages, anti-virus software, etc. are not to be mentioned, but they can be considered. After reading some materials during destructive testing, I learned that the knowledge and content designed here can be written into a book, and it cannot be explained in one or two sentences. Especially some business websites, or web sites related to money, or company secrets need this kind of testing. In foreign countries, there is a kind of people who specialize in this field called security consultants, who can review codes, make security suggestions, and deal with emergencies. I have not heard of any content dedicated to security technology testing in China. j Compatibility: Different browsers and different application versions have different ways of surfing the Internet when implementing functions, if you are testing a public website.
testing is also called functional testing or data-driven testing. It is to test whether each function can be used normally when the functions that the product should have are known. During the test, the program is regarded as a black basin that cannot be opened. Without considering the internal structure and internal characteristics of the program, the tester tests the program interface. It only checks whether the program functions are used normally according to the requirements specification, whether the program can properly receive input data and generate correct output information, and maintain the integrity of external information (such as databases or files). The main black box testing methods include equivalence class partitioning, boundary value analysis, cause-effect diagrams, error speculation, etc., which are mainly used for software confirmation testing. The "black box" method focuses on the external structure of the program, does not consider the internal logical structure, and tests the software interface and software functions. The "black box" method is an exhaustive input test. Only by using all possible inputs as test cases can all errors in the program be found in this way. In fact, there are infinite test cases. People not only have to test all legal inputs, but also those illegal but possible inputs.
White box testing
White box testing is also called structural testing or logic-driven testing. It knows the internal working process of the product. It can be used to test whether the internal actions of the product are carried out normally according to the provisions of the specification manual. According to the internal structural test program of the program, it is checked whether each path in the program can work correctly according to the predetermined requirements, regardless of its function. The main methods of white box testing are logic-driven and base path testing, which are mainly used for software verification.
The "white box" method fully understands the internal logical structure of the program and tests all logical paths. The "white box" method is an exhaustive path test. When using this solution, the tester must check the internal structure of the program, start from checking the logic of the program, and obtain test data. The number of independent paths running through the program is astronomical. But even if every path is tested, there may still be errors. First, exhaustive path testing can never find out that the program violates the design specifications, that is, the program itself is a wrong program. Second, exhaustive path testing cannot find errors in the program due to missing paths. Third, exhaustive path testing may not find some data-related errors.
Software developers use white box testing methods to check program modules as follows: – Test all independent execution paths of program modules at least once; – Test all logical decisions at least once for both “true” and “false” situations; – Execute loop bodies within loop boundaries and running limits; – Test the validity of internal data structures, etc. Specific logical coverage includes: – Statement coverage – Decision coverage – Condition coverage – Decision-condition coverage – Condition combination coverage – Path coverage. White Box Testing Technology : Testing at the code level. This technology is used to find problems at the earliest and has the best effect. The main feature of this technology is that the test object enters the code. According to the developer’s familiarity with the code and the program, the necessary parts are tested. During the software coding stage, the software testing conducted by the developer based on his understanding and contact with the code is called white box testing. This stage of testing is mainly conducted by software developers. Xunit series tools are used on the JAVA platform for testing. Xunit testing tools are class-level testing tools that test each class and the methods of the class. Black Box Testing Technology : The content of black box testing mainly includes the following aspects, but the main part is still the functional part. It mainly covers all functions and can be combined with compatibility and performance testing. According to software requirements, design documents, simulate customer scenarios and conduct actual tests with the system. This testing technology is the most used testing technology and covers all aspects of testing. The following aspects can be considered: c Correctness: calculation results, naming, etc. d Usability: whether the software requirements can be met. e Boundary Condition: The boundary value of the input part, that is, the equivalent class division mentioned in general books, try the maximum, minimum and illegal data, etc. f Performance: The time required for the system to complete a task during normal use, and the response time is within an acceptable range when multiple people use it at the same time. The system implemented by J2EE technology needs to be taken care of in terms of performance. The general principle is that less than 3 seconds is acceptable, 3-5 seconds is acceptable, and more than 5 seconds affects ease of use. If performance problems are found during the test, it is very difficult to fix them, because this often means that the program's algorithm is not good, the structure is not good, or there is a problem with the design. Therefore, at the beginning of product development, the performance of the software should be considered . g Stress test (Stress): In the case of multiple users, you can consider using stress testing tools. It is recommended to combine stress and performance testing. If there is load balancing, you should also open monitoring tools on the server side to check the server CPU usage, memory usage, and if necessary, you can simulate a large amount of data input, the impact on the hard disk, and other information. If necessary, performance optimization must be performed (software and hardware can be used). The stress test here targets certain functions. h Error recovery (Error Recovery): Error handling, page data verification, including sudden power outages, dirty data input, etc. i Security test (Security): This field is under research. Firewalls, patch packages, anti-virus software, etc. are not to be mentioned, but they can be considered. After reading some materials during destructive testing, I learned that the knowledge and content designed here can be written into a book, and it cannot be explained in one or two sentences. Especially some business websites, or web sites related to money, or company secrets need this kind of testing. In foreign countries, there is a kind of people who specialize in this field called security consultants, who can review codes, make security suggestions, and deal with emergencies. I have not heard of any content dedicated to security technology testing in China. j Compatibility: Different browsers and different application versions have different ways of surfing the Internet when implementing functions, if you are testing a public website.
Previous article:Software Testing Workflow Diagram
Next article:Differential pair tube detection method
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Analog Electronics Articles
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
Guess you like
- An article to understand the commonly used microwave transmission lines (I)
- [Q&A] About the selection of C2000
- Summary of MCU delay methods
- EEWORLD University Hall----ADI Online Seminar Differential Circuit Design Technology in Communication Applications
- Who can teach me?
- Understanding the Q and D values of capacitors
- How to solve the problem of power-on reset confusion in single-chip microcomputers
- Threshold voltage question
- How to view ADI data sheet information sharing
- Anlu SparkRoad domestic FPGA evaluation [Problem feedback] ASUS win10 installation Anlu Jtag driver problem