下述文章翻译自CODE WITH ARHO

  • JUnit 5 教程

    JUnit5教程关注于如何为JavaKotlin代码块编写和运行单元测试,本教程针对初学者和已经熟悉JUnit某些版本的人员,本教程中的文章已分为不同的部分。

    入门
    JUnit5的基本特性
    [译]JUnit5入门-编写第一段测试代码
    [译]JUnit 5 断言-验证测试结果
    [译]JUnit 5 嵌套测试-将关联的测试分组在一起
    [译]JUnit 5 生命周期-注释之前和之后
    A More Practical Guide to JUnit 5 Parameterized Tests
    进阶
    已经掌握基础知识后
    A More Practical Guide to JUnit 5 Parameterized Tests
    JUnit 5 with Kotlin for Java developers
    Migrating From JUnit 4 to JUnit 5: A Definitive Guide
    构建支持
    运行JUnit5单元测试
    JUnit 5 Maven Example: Running Tests with Surefire
    JUnit 5 Gradle Example: Running Tests with Gradle
    常见问题
    常见问题解答
    How to assert an exception is thrown?
    How do I test private methods?
  • SpringBoot单元测试教程

    在本教程中,我们将了解如何为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