JAVA TestNG单元测试详解

TestNG单元测试详解

 

by:授客 QQ1033553122

1. 测试环境 2

2. 介绍 2

3. Annotation 2

4. testng.xml 3

4.1. 1 3

4.2. 2 5

4.3. 3 5

4.4. 4 9

5. 测试方法(Test method), 测试类(Test class),测试组(Test groups) 10

5.1. 测试方法(Test method) 10

5.2. 测试组(test groups) 10

5.2.1. 1 10

5.2.2. 2 11

5.2.3. 3 12

嵌套组 13

排除组 14

Partial 14

6. 参数 16

6.1. 来自testng.xml的参数 16

6.1.1. 1 16

6.1.2. 2 17

6.2. 携带DataProvider的参数 18

6.2.1. 1 18

6.2.2. 2 19

6.2.3. 3 20

7. 依赖 21

7.1. 使用注解的依赖 21

7.1.1. 1 22

7.1.2. 2 23

7.1.3. 3 24

7.1.4. 4 24

7.2. XML中的依赖 27

8. 工厂模式 28

8.1. 1 28

8.2. 2 31

9. 类级别的注解 31

10. 并行和超时 32

10.1. 并行套件 32

10.2. 并行test,classmethod 34

11. 返回失败测试 34

12. JUnit tests 34

13. Annotation转换 35

14. Method Interceptors 35

15. TestNG Listeners 35

16. Dependency injection 35

17. 重写测试方法 35

18. 更改套件、方法 35

19. 通过编程方式运行TestNG 35

20. 测试结果 38

20.1. 成功,失败断言 38

20.1.1. 1 38

20.1.2. 2 38

20.2. Logging和结果 39

20.2.1. logging监听器 39

20.2.2. Logging Reporters 42

。。。。


篇幅问题:采用网盘链接分享

TestNG单元测试详解

 

posted @ 2017-05-01 20:33  授客  阅读(1114)  评论(0编辑  收藏  举报