Java
Need help with spring-test-examples?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
chanjarster

Description

Spring、Spring Boot和TestNG测试指南

230 Stars 87 Forks Apache License 2.0 48 Commits 0 Opened issues

Services available

Need anything else?

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.