Difference between black box testing and white box testing

Publisher:WhisperingRainLatest update time:2012-02-01 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
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.
























Reference address:Difference between black box testing and white box testing

Previous article:Software Testing Workflow Diagram
Next article:Differential pair tube detection method

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号