下述文章翻译自CODE WITH ARHO
-
JUnit5教程关注于如何为Java和Kotlin代码块编写和运行单元测试,本教程针对初学者和已经熟悉JUnit某些版本的人员,本教程中的文章已分为不同的部分。 -
在本教程中,我们将了解如何为
Spring Boot应用程序编写测试,我们将使用Spring Boot提供的测试支持和附加测试库。我们将从基础知识开始,逐步完成更高级的主题, 这些主题将涵盖不同级别的测试,从独立的单元测试到针对整个
Spring Boot应用程序执行的集成测试。SpringBoot单元测试基础
从这里开始Introduction to Testing Spring Boot Applications Spring Boot Unit Testing Testing Web Controllers With Spring Boot @WebMvcTest Testing the Persistence Layer With Spring Boot @DataJpaTest A More Practical Guide to JUnit 5 Parameterized Tests 中级主题
已经掌握基础知识后Testing Serialization With Spring Boot @JsonTest Testing Spring Boot WebClient With MockWebServer Testing Spring Security Spring Boot Testing Strategy