使用 JUnit、Mockito 和 Testcontainers 测试 Spring Boot 应用程序
上次更新时间:2024-11-27
课程售价: 2.9 元
联系右侧微信客服充值或购买课程
课程内容
01 - Introduction
02 - Spring Boot Project Setup
03 - Spring Boot - Unit Testing Repository Layer
- 001 Repository layer Unit testing overview
- 002 Spring Boot @DataJpaTest annotation
- 003 Unit test for save employee operation
- 004 Unit test for get all employees operation
- 005 Unit test for get employee by id operation
- 006 Unit test for get employee by email operation (Spring Data JPA query method)
- 007 Unit test for update employee operation
- 008 Unit test for delete employee operation
- 009 Unit test Spring Data JPA custom query method using JPQL with index parameters
- 010 Unit test Spring Data JPA custom query method using JPQL with named parameters
- 011 Unit test Spring Data JPA custom native query with index parameters
- 012 Unit test Spring Data JPA custom Native query with Named parameters
- 013 Refactoring JUnit tests to use @BeforeEach annotation
04 - Spring Boot - Unit Testing Service Layer
- 001 Service Layer unit testing overview
- 002 Create EmployeeService with saveEmployee method
- 003 Quick Recap of Mockito basics (before writing JUnit tests to use Mock objects)
- 004 Unit test for EmployeeService saveEmployee method
- 005 Using @Mock and @InjectMocks annotations to mock the object
- 006 Unit test for saveEmployee method which throws Exception
- 007 Unit test for EmployeeService getAllEmployees method - Positive Scenario
- 008 Unit test for EmployeeService getAllEmployees method - Negative Scenario
- 009 Unit test for EmployeeService getEmployeeById method
- 010 Unit test for EmployeeService updateEmployee method
- 011 Unit test for EmployeeService deleteEmployee method
05 - Spring Boot - Unit Test Controller Layer (Unit Test REST APIs)
- 001 Controller Layer unit testing overview
- 002 Overview of @WebMvcTest annotation
- 003 @WebMvcTest VS @SpringBootTest
- 004 Build createEmployee REST API
- 005 Unit test createEmployee REST API
- 006 Build GetAllEmployees REST API
- 007 Unit test GetAllEmployees REST API
- 008 Refactoring JUnit test to use static imports
- 009 Build getEmployeeById REST API
- 010 Unit test getEmployeeById REST API - Positive Scenario
- 011 Unit test getEmployeeById REST API - Negative Scenario
- 012 Build updateEmployee REST API
- 013 Unit test updateEmployee REST API - Positive Scenario
- 014 Unit test updateEmployee REST API - Negative Scenario
- 015 Build deleteEmployee REST API
- 016 Unit test deleteEmployee REST API
06 - Spring Boot - Integration Testing using Local MySQL Database
- 001 Integration testing overview
- 002 @SpringBootTest annotation overview
- 003 Configure MySQL database for integration testing
- 004 Create a base for Integration testing
- 005 Integration test for create employee REST API
- 006 Integration test for get all employees REST API
- 007 Integration test for get employee by id REST API - Positive & Negative Scenarios
- 008 Integration test for update employee REST API - Positive & Negative Scenarios
- 009 Integration test for delete employee REST API
- 010 Integration testing EmployeeRepository using MySQL database
07 - Spring Boot - Integration Testing using Testcontainers
08 - Assignments and Solutions
10 - Spring WebFlux - Build Reactive CRUD REST APIs
- 001 Spring WebFlux Overview
- 002 Spring Boot WebFlux Application Architecture
- 003 Deploy MongoDB in Docker Container
- 004 Create and Set up Spring Boot Project in IntelliJ IDE
- 005 Create Employee Entity
- 006 Create EmployeeRepository and Understanding Internals
- 007 Create EmployeeDto and EmployeeMapper
- 008 Build Reactive Add Employee REST API
- 009 Build Reactive Get Employee REST API
- 010 Build Reactive Get All Employees REST API
- 011 Build Reactive Update Employee REST API
- 012 Build Reactive Delete Employee REST API
11 - Spring WebFlux - Unit Testing Reactive CRUD REST APIs
12 - Spring WebFlux - Integration Testing Reactive CRUD REST APIs
课程内容
11个章节 , 89个讲座
01 - Introduction
02 - Spring Boot Project Setup
03 - Spring Boot - Unit Testing Repository Layer
- 001 Repository layer Unit testing overview
- 002 Spring Boot @DataJpaTest annotation
- 003 Unit test for save employee operation
- 004 Unit test for get all employees operation
- 005 Unit test for get employee by id operation
- 006 Unit test for get employee by email operation (Spring Data JPA query method)
- 007 Unit test for update employee operation
- 008 Unit test for delete employee operation
- 009 Unit test Spring Data JPA custom query method using JPQL with index parameters
- 010 Unit test Spring Data JPA custom query method using JPQL with named parameters
- 011 Unit test Spring Data JPA custom native query with index parameters
- 012 Unit test Spring Data JPA custom Native query with Named parameters
- 013 Refactoring JUnit tests to use @BeforeEach annotation
04 - Spring Boot - Unit Testing Service Layer
- 001 Service Layer unit testing overview
- 002 Create EmployeeService with saveEmployee method
- 003 Quick Recap of Mockito basics (before writing JUnit tests to use Mock objects)
- 004 Unit test for EmployeeService saveEmployee method
- 005 Using @Mock and @InjectMocks annotations to mock the object
- 006 Unit test for saveEmployee method which throws Exception
- 007 Unit test for EmployeeService getAllEmployees method - Positive Scenario
- 008 Unit test for EmployeeService getAllEmployees method - Negative Scenario
- 009 Unit test for EmployeeService getEmployeeById method
- 010 Unit test for EmployeeService updateEmployee method
- 011 Unit test for EmployeeService deleteEmployee method
05 - Spring Boot - Unit Test Controller Layer (Unit Test REST APIs)
- 001 Controller Layer unit testing overview
- 002 Overview of @WebMvcTest annotation
- 003 @WebMvcTest VS @SpringBootTest
- 004 Build createEmployee REST API
- 005 Unit test createEmployee REST API
- 006 Build GetAllEmployees REST API
- 007 Unit test GetAllEmployees REST API
- 008 Refactoring JUnit test to use static imports
- 009 Build getEmployeeById REST API
- 010 Unit test getEmployeeById REST API - Positive Scenario
- 011 Unit test getEmployeeById REST API - Negative Scenario
- 012 Build updateEmployee REST API
- 013 Unit test updateEmployee REST API - Positive Scenario
- 014 Unit test updateEmployee REST API - Negative Scenario
- 015 Build deleteEmployee REST API
- 016 Unit test deleteEmployee REST API
06 - Spring Boot - Integration Testing using Local MySQL Database
- 001 Integration testing overview
- 002 @SpringBootTest annotation overview
- 003 Configure MySQL database for integration testing
- 004 Create a base for Integration testing
- 005 Integration test for create employee REST API
- 006 Integration test for get all employees REST API
- 007 Integration test for get employee by id REST API - Positive & Negative Scenarios
- 008 Integration test for update employee REST API - Positive & Negative Scenarios
- 009 Integration test for delete employee REST API
- 010 Integration testing EmployeeRepository using MySQL database
07 - Spring Boot - Integration Testing using Testcontainers
08 - Assignments and Solutions
10 - Spring WebFlux - Build Reactive CRUD REST APIs
- 001 Spring WebFlux Overview
- 002 Spring Boot WebFlux Application Architecture
- 003 Deploy MongoDB in Docker Container
- 004 Create and Set up Spring Boot Project in IntelliJ IDE
- 005 Create Employee Entity
- 006 Create EmployeeRepository and Understanding Internals
- 007 Create EmployeeDto and EmployeeMapper
- 008 Build Reactive Add Employee REST API
- 009 Build Reactive Get Employee REST API
- 010 Build Reactive Get All Employees REST API
- 011 Build Reactive Update Employee REST API
- 012 Build Reactive Delete Employee REST API