1.1 生成基本的等价类
外部条件 有效等价类 无效等价类
Order of arguments (1) The combination of the orders
Number of source files (2) one, (3)more (4) 0 source file
Src file suffix (5) .java (6) Other types
Number of Arg files (7) one, (8)more (9) 0 Arg files
Content of arg files (10) Options, (11) Src files (12), Both (13) Other
Type of definition (14) Class (15) Interface (16) Other type
Language of source file (17) Java language (18) Other language
Ways to pass src files (19) Command line (20)In Arg file (21) Both in command line and arg file
Arg file symbol is @ (22) Yes (23) No
Src file name=class name (24) Yes (25) No
Dir tree reflect package tree (26) Yes (27) No
Output DIR (28) same as src dir, (29)Seperate dir
Is class path Specified (30) Yes (31) No
-d Is Dir exists (31) Yes (32)No
-d Is class part of package (33) Yes (34) No
-d Sub dir of dest Dir (35) 0, (36) 1, (37) more
-d Number of dest Dirs (38) 1 (39) more
1.2 精化等价类 消除/确定等价类间依赖
Order of arguments The combination of the orders
Src file suffix .java Other types
Ways to pass src files Command line, Arg file, Both
Src files in command line (one, Zero), (one, one), (one, more), (Zero, Zero)
and arg files combine (more, zero), (more, one), (more, more)
(Zero, one), (Zero, more)
Content of arg files None, Options, Src files, Both Other
Type of definition Class, Interface Other type
Language of source file Java language Other language
Arg file symbol is @? Yes No
Src file name=class name Yes No
Package & Dir tree relation
Has Package: Yes, No
Dir reflect package: Yes, No (Yes, Yes), (Yes,No), (No, Yes), (No, No)
Output Dir same as src dir, Seperate dir
-d Is Dir exists Yes No
-d Is class part of package Yes No
-d Sub dir of dest Dir 0, 1, more
-d Number of dest Dirs 1 more
1.3 精化-确定 项间关系
Order of arguments (1) The combination of the orders[Order1, Order2]
order1 1A: Option, Source File, Arg File
order2 1B: Arg File, Option, Source File
Src file suffix (2) .java (3) Other types
Ways to pass src files (4)(more, zero) (5)(more, more) (7)(Zero, Zero)
Command line,Arg file,Both (6)(Zero, more)
Arg file symbol is @? (8) Yes (9) No
Content of Arg files (10)None (11)Src files (14)Other
(12)Options (13)Both
Type of definition (15)Class (16)Interface or Both (17) Other type
Language of source file (18)Java language (19) Other language
Src file name=class name (20)Yes (21) No
Has Package: (22)Yes (23)No
Output Dir (24)Src dir (25)Seperate dir
-d Is Dir exists (26)Yes (27)No
-d Dest Dir contains Sub Dir (28)0 (29)1 (30)more
-d Number of dest Dirs (31)1, (32)More
2. 生成测试用例
1. 为每个等价类设置不同的编号.
2. 编写新的测试用例,尽可能多滴覆盖那些尚未被覆盖的有效等价类,直到所有的有效等价类都被测试用例所覆盖.
3. 编写新的测试用例,覆盖一个且仅一个尚未被覆盖的无效等价类,直到所有的无效等价类都被测试用例所覆盖.
Valid EP
1) 1A,2,4,10,15,18,20,22,24
javac hello.java hello2.java
2) 1A,2,5,8,11,16,18,20,23,25,26,28,31
javac hello.java, hello1.java @argSrc
3) 1B,2,6,8,12,16,18,20,23,25,26,29,31
javac @argSrc -g hello1.java
4) 1B,2,6,8,13,16,18,20,23,25,26,30,31
invalid EP
5) 3
6) 7
7) 9
7) 14
9) 17
10) 19
11) 21
12) 28
13) 33