Skip to content

bladewangpro/spring-test-examples

 
 

Repository files navigation

Spring、Spring Boot和TestNG测试指南

Spring、Spring Boot都提供了非常便利的测试工具,但遗憾的是官方文档的大多数例子都是基于JUnit的。本人比较喜欢用TestNG做单元、集成测试,所以开启了本项目收集了在Spring、Spring Boot项目中利用TestNG测试的例子。

章节列表

  1. Chapter 0: 基本概念
  2. Chapter 1: 基本用法
    1. 引言
    2. 认识TestNG
    3. 使用Spring Testing工具
    4. 使用Spring Boot Testing工具
  3. Chapter 2: Annotations
    1. 引言
    2. @TestPropertySource
    3. @ActiveProfile
    4. @JsonTest
    5. @OverrideAutoConfiguration
    6. @TestConfiguration
  4. Chapter 3: 使用Mockito
  5. Chapter 4: 测试关系型数据库
    1. 基本做法
    2. 使用Docker创建临时数据库
  6. Chapter 5: 测试Spring MVC
  7. Chapter 6: 测试AOP
  8. Chapter 7: 测试@Configuration
  9. Chapter 8: 共享测试配置
  10. 附录I Spring Mock Objects
  11. 附录II Spring Test Utils

About

Spring、Spring Boot和TestNG测试指南

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%