3-1 conditions and Determination of logical coverage test

Source: Internet
Author: User

(X> 5) & (Y> 0 ))

  • Decision coverage criterion (DC): the true and false values are executed at least once.

// {(6, 1), (1, 1)} -- DC
Int Foo (int x, int y ){
Int z = y * 2; \ Z = y;
If (x> 5) & (Y> 0 )){
Z = x ;}
Return x * z;
}

  • Condition overwriting (CC): Each condition's true and false are executed at least once.

(X> 5): true and false
(Y> 0): true and false

// {(6, 0), (0, 1)} -- CC
Int Foo (int x, int y ){
Int z = y;
If (x> 5) & (Y> 0 )){
Z = x ;}
Return x * z;
}

----- Subsume Relation

C1 contains C2 (or C2 is contained by C1) and is recorded
A ≥ B: For any P: C1 (p )? C2 (P ).
DC ≥ SC
CC not ≥ SC
DC not ≥ CC, CC not ≥ DC

  • Conditional decision coverage (C/DC ):Both DC and CC are supported.

C/DC (p) = Cc (p) ∩ DC (P)

C/DC ≥ CC

C/DC ≥ DC

//
Int Foo (int x, int y ){
Int z = y;
If (x> 5) & (Y> 0 )){
Z = x ;}
Return x * z;
}

  • Modify condition determination overwrite (MC/DC): Each condition independently affects the determination of true and false each time.

MC/DC
(X> 5) & (Y> 0 ))

T
T f
F t f
F

MC/DC
Modified condition/demo-coverage
(MC/DC) is a C/DC enhanced version.
MC/DC is an important criterion of DO-178B standards
(Federal Aviation Administration)
MC/DC as the control software is the strictest (Level)
Logic test coverage criteria

 

3-1 conditions and Determination of logical coverage test

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.