The logic cover method of white box test

Source: Internet
Author: User

The logic cover method of white box test

A white box test is also called a logical drive test or a structural test.

    • Differences from black Box testing: focus on the internal structure of the code
    • The premise of White box testing: The internal logic of the known code
    • Test method: Logic Overlay method

The logic covering method consists of six kinds, from weak to strong: statement overlay, decision coverage, conditional coverage, decision/condition coverage, conditional combination coverage, and path overlay.

Logic overlay French Sentence overlay

Each statement in the code block that will be tested is executed at least once. Does not care about the execution result of the statement, as long as the execution of a statement, it is said that the statement is overwritten.

Decision coverage

The decision can be seen as an if statement, in the program flowchart with a diamond representation, the IF statement has only two results: true, false. So the decision covering is also called Branch coverage, each decision has a true, false two branches. The decision overlay is performed at least once for each branch of each decision, based on the statement coverage.

Conditional override

The condition is a sub-expression that is split with logical operators in the logical expression of each if statement. There are two cases for each condition: eligible, non-conforming. Conditional overrides are performed at least once for each condition, based on the statement overlay.

Decision/Conditional override

The decision/condition coverage is consistent with the decision coverage and the conditional coverage.

Conditional combination Overrides

For each decision, the combination of the two conditions of each condition, if n represents the number of conditions contained in each decision, then for each decision, the composition of the 2^n species.

Path Overlay

When there is a decision, the original path is changed, and the path overlay executes all the paths again.

The relationship between the various overlays
types of logical coverage methods Relationship
Statement overrides -
Decision coverage Include statement overrides
Conditional override Include statement overrides
Decision/Conditional override Satisfy both judgment and conditional coverage
Conditional combination Overrides Satisfies the conditional combination override, must satisfy the decision/condition coverage
Path Overlay -
Graphic Logic Overlay Method

Diagram Logic Overlay method

Hope that these can give soft test of small partners to provide help ~~~~!

Logic Overlay method for white-box testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.