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

Branch Testing
  • 时间:2024-03-21 05:05:05

Branch Testing


Previous Page Next Page  

What is Branch Testing?

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

这就是说,每个部门都采取不同的方式,都是真实和虚假的。 它有助于验证法典的所有分支,确保任何分支都不会导致申请的不正常行为。

Formula:

Branch Testing = (Number of decisions outcomes tested / Total Number of decision Outcomes) x 100 %

Example:

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

以上逻辑可体现为:

Branch 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 Branch Coverage is 2.
Advertisements