English 中文(简体)
Software Testing Dictionary

A

B

C

D

E

F

G

H

I

K

L

M

N

O

P

Q

R

S

T

U

V

W

Useful Resources

Selected Reading

Decision Coverage Testing
  • 时间:2024-03-21 02:00:34

Decision Coverage Testing


Previous Page Next Page  

What is Decision Coverage Testing?

决策范围或处覆盖面是一种测试方法,目的是确保每个决定点可能设立的分支至少一次得到执行,从而确保实施所有可达到的守则。

这就是说,每一项决定都是以真实和虚假的方式作出的。 它有助于验证法典的所有分支,确保任何分支都不会导致申请的不正常行为。

Example:

Read A
Read B 
IF A+B > 10 THEN 
  Print "A+B is Large" 
ENDIF 
If A > 5 THEN 
  Print "A Large"
ENDIF

以上逻辑可体现为:

Decision Testing in Test Life Cycle

Result :

To calculate Branch  Coverage, one has to find out the minimum number of paths which will ensure that all the edges are covered. In this case there is no single path which will ensure coverage of  all the edges at once. The aim is to cover all possible true/false decisions.
(1) 1A-2C-3D-E-4G-5H
(2) 1A-2B-E-4F
Hence Decision or Branch Coverage is 2.
Advertisements