White box testing

Source: Internet
Author: User

White box testing

Everyone is familiar with the software testing methods, including black box testing and white box testing. The black box testing is a simple functional testing and will not be described here. The following describes several testing methods that are easy to mix in the white box test.

The most common method in software testing is the logical coverage method. All available methods are divided into the following order based on the degree of coverage from weak to strong: statement overwrite, decision overwrite, condition overwrite, Decision-condition overwrite, condition combination overwrite, and path overwrite.

As long as you understand the nature, these testing methods are not that difficult. For example

In this figure, two judgment statement branches form four paths. Analyze the number of paths that can be covered by various overwrites.

Statement overwrite: each statement must be executed once. For example, the statement executed in the ace path can meet the conditions.

Decision overwrite: The T and F values of this decision must be executed once and both true and false. For example, if the path ace and abd are executed, the conditions are met.

Conditional coverage: This is smaller than the granularity of the Decision coverage. The granularity of the former is the criteria in the determination. For example, all the conditions for this decision are A> 1, A <= 1 ,, the determination under B = 0 and B = 0 also has four conditions.

Condition coverage: A test case that satisfies the criteria and covers conditions. <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + zPW8/tfpus + 4srjHo7q499bWzPW8/rXE1 + m6z6Os0rK + zcrH1eLLxLj2zPW8/fingerprint "http://www.2cto.com/uploadfile/Collfiles/20140929/2014092909211610.png" alt = "\">

Path coverage: the highest degree of coverage. You can test all the paths. Ace, abe, abd, acd

The coverage of the preceding methods is increasing progressively. The similarities and differences between conditional coverage and decision coverage should be distinguished, which has been highlighted in the context coverage.

For beginners, please note that something is inappropriate.

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.