Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Black box test and white box test

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Black box testing and white box testing

Black box testing: knowing the functional design specifications of the product, you can test to prove whether each realized function meets the requirements.

White box testing: knowing the internal working process of the product, you can test whether each internal operation meets the design specifications and whether all internal components have been checked.

1. First understanding:

Black box test

Test features: test function

Test basis: requirement specification

Method examples: equivalent class division, boundary value test

Advantages: ability to test from the user's point of view

Disadvantages: can not test specific parts of the program, if the program is wrong, it can not be found.

White-box testing

Test features: test program interface and structure

Test basis: software program

Method example: logical coverage

Advantages: carry out coverage testing on specific parts of the program.

Disadvantages: the external features of the program cannot be verified.

two。 Second understanding:

The black box test regards the program as a black box that cannot be opened, and tests the "software interface" and "software function" without considering the internal structure and internal characteristics of the program. Only check whether the function conforms to the requirements specification and can be used normally. Therefore, black box testing is also called functional testing or data-driven testing.

White-box testing is a detailed examination of the process details of the software. This method regards 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 known as "structural testing" or "logic-driven testing". White box testing is to test the program according to the internal structure of the program, by testing whether the internal action of the product is carried out normally in accordance with the requirements of the design specification, and whether each channel in the program works normally in accordance with the regulations.

3. The third understanding:

The main purpose of black box testing is to find the following errors:

(1) whether there are incorrect or omitted functions

(2) can the input be accepted correctly on the interface? Can you output the correct results?

(3) are there any data structure errors or external information (such as database files) access errors?

(4) can the performance meet the requirements?

(5) are there any initialization or termination errors?

There are three kinds of test case technical design of black box: boundary value analysis, equivalent class division and error inference method.

The main purpose of white-box testing is to check the program module as follows:

(1) Test all independent execution paths of the program module at least once.

(2) for all logical judgments, both "true" and "false" can be tested at least once.

(3) execute the loop body within the boundaries of the loop and the limits of operation.

(4) testing the validity of internal data structures, and so on.

(v) static white box testing: that is, code review, formal review and verification of design and program code

(6) dynamic white box testing uses the information obtained by viewing the function and implementation of the code to design and execute the test, also known as structural testing.

White-box test case technology includes logical coverage and basic path testing.

Logical coverage: test case design technology based on the inherent logical structure of the program, this method requires testers to have a clear understanding of the logical structure of the program.

Basic path testing: on the basis of the program control flow chart, the basic executable path set is derived by analyzing the loop complexity of the control structure, and the test case is designed.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report