图 2路径测试与分支测试 a 国 分支覆盖: YES 1.abd A>1 and B==0 2. ace b NO X=X+A 路径覆盖: 1.abd YES A=-2 or X>1 2.abe e NO 3.acd X-X/A 4. d ace >校长办公室 >Office of the President
¾校长办公室 ¾Office of the President 2 路径测试与分支测试 分支覆盖: 1. abd 2. ace 路径覆盖: 1. abd 2. abe 3. acd 4. ace A>1 and B= =0 A==2 or X>1 a b d X=X+A X=X/A e NO YES c YES NO
③ 路径测试与分支测试 循环: 分支覆盖:2 路径覆盖:N+1 >校长办公室 >Office of the President
¾校长办公室 ¾Office of the President 路径测试与分支测试 循环: 分支覆盖:2 路径覆盖:N+1
⑧ 国DD路径 ⑧McCabe圈数V(G)计算方 A 法: V(G)=e-n+2p e:边数; n:节点数 p:连接区域数 G 对于右图:V(G)=10-7+2=5 >校长办公室 >Office of the President
¾校长办公室 ¾Office of the President DD路径 McCabe圈数V(G)计算方 法: V(G)=e-n+2p e:边数; n:节点数 p:连接区域数 对于右图: V(G)=10-7+2=5 B D E A C F G
上帝充通大¥ 旧96 SHANGHAI JIAO TONG UNIVERSITY ,1896 1935 1987 ,2006 3 Category-partition Method ·Key idea Method for creating test suites -Role of test engineer Analyze the system specification Write a series of formal test specifications -Automatic generator ●Produces test frames
¾1896 ¾1935 ¾1987 ¾2006 3 Category-partition Method • Key idea – Method for creating test suites – Role of test engineer • Analyze the system specification • Write a series of formal test specifications – Automatic generator • Produces test frames
图 Steps Decompose the functional specification into functional units -Characteristics of functional units They can be tested independently ·Examples -A top-level user command Or a function Decomposition may require several stages Similar to high-level decomposition done by software designers May be reused,although independent decomposition is recommended >校长办公室 >Office of the President
¾校长办公室 ¾Office of the President Steps • Decompose the functional specification into functional units – Characteristics of functional units • They can be tested independently • Examples – A top-level user command – Or a function • Decomposition may require several stages • Similar to high-level decomposition done by software designers – May be reused, although independent decomposition is recommended