search
HomeCommon ProblemWhite box testing is to design test cases based on the program

White box testing is to design test cases based on the "internal logic" of the program. White-box testing is to conduct coverage testing of the logical paths in the software by checking the internal logical structure of the software; setting up checkpoints in different places of the program to check the status of the program to determine whether the actual running status is consistent with the expected status.

White box testing is to design test cases based on the program

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

White box testing is to design test cases based on the "internal logic" of the program, while black box testing is to design test cases based on the "specifications" of the software.

White box testing is also called structural testing, transparent box testing, logic-driven testing or code-based testing. White box testing is a test case design method. The box refers to the software being tested. White box means that the box is visible, that is, it is clear what is inside the box and how it works. The "white box" method fully understands the internal logical structure of the program and tests all logical paths. The "white box" method is exhaustive path testing. When using this solution, the tester must examine the internal structure of the program and start by examining the logic of the program to derive test data. The number of independent paths through a program is astronomical.

White box testing performs coverage testing on the logical paths in the software by checking the internal logical structure of the software. Set up checkpoints at different places in the program to check the status of the program to determine whether the actual running status is consistent with the expected status.

The coverage standards of the white box testing method include logical coverage, loop coverage and basic path testing. Logic coverage includes statement coverage, decision coverage, condition coverage, decision/condition coverage, condition combination coverage and path coverage. The ability of the six coverage standards to detect errors changes from weak to strong:

1. Statement coverage Each statement is executed at least once.

2. The decision covers each branch of each decision and is executed at least once.

3. Condition coverage Each condition of each judgment should take various possible values.

4. Judgment/condition coverage meets the judgment coverage condition coverage at the same time.

5. Condition combinations cover each combination of conditions in each judgment and appear at least once.

6. Path coverage enables every possible path in the program to be executed at least once.

Category:

White box testing methods are generally divided into two categories: static analysis methods and dynamic analysis methods.

Static analysis is a technique for testing without executing the program. The key function of static analysis is to check whether the representation and description of the software are consistent and whether there are conflicts or ambiguities.

Dynamic analysis is the analysis of the behavior of a software system before, during and after its execution in a simulated or real environment. Dynamic analysis involves the formal execution of a program in a controlled environment with specific expected results. It shows whether a system is correct or incorrect in its checked state. Among dynamic analysis techniques, the most important techniques are path and branch testing.

For more knowledge about computer programming, please visit: Programming Video! !

The above is the detailed content of White box testing is to design test cases based on the program. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor