Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Master JUnit 5 , Mockito with Spring Boot Industry Project
Rating: 4.6 out of 5(10 ratings)
49 students

Master JUnit 5 , Mockito with Spring Boot Industry Project

Learn Concepts of JUnit 5 , Mockito, and end-to-end Testing in Spring Boot Industry Level Project | Detailed Explanation
Created byKrishan Gawaria
Last updated 9/2025
English
English [Auto],

What you'll learn

  • Create a Spring Boot App
  • @Test and Assertions
  • Various ways to Run Test Methods
  • Structuring Test Method - GIVEN WHEN THEN
  • Assertion Error Message
  • Assertions for boolean
  • Assertions for null
  • Multiple Assertions in a Test Method
  • Assertions of Exception
  • Static Import of Assertions
  • @Disabled and fail()
  • Build a Real Time Spring Boot Project
  • Service Layer Basic Test
  • @TestMethodOrder
  • Service Layer Parameterized Test
  • @ParameterizedTest
  • @CsvFileSource
  • @CsvSource
  • @MethodSource
  • @TestInstance
  • @BeforeEach
  • @AfterEach
  • @BeforeAll
  • @AfterAll
  • Lifecycle Methods
  • Code Coverage
  • maven-surefire-report-plugin
  • Jacoco
  • Mockito
  • @Mock
  • Mockito.when()
  • Mockito.then()
  • Mockito.any()
  • WebMvc - Testing Controller Layer
  • @WebMvcTest
  • @MockitoBean
  • MockMvcRequestBuilders
  • MockMvc
  • Testing Entity Layer
  • @DataJpaTest
  • TestEntityManager
  • Testing Repository Layer
  • Query Methods - @Query
  • Integration Testing - Testing All Layers Together
  • @SpringBootTest Annotation with webEnvironment
  • TestRestTemplate
  • Azure Database
  • TDD - Test Driven Development

Course content

26 sections • 184 lectures • 11h 42m total length
  • Introduction3:14

    Master JUnit five and Mockito with Spring Boot through an industry-level project, covering assertions, annotations, service-to-controller-to-repository testing, integration testing, parameterized tests, test driven development, and 100% code coverage.

  • Software to Install2:51

    Install and configure essential tools for this course: JDK 21, set its path, install IntelliJ IDEA Community, and optionally Postman to hit APIs and test endpoints.

  • List of Software0:04
  • Git Repository0:36

    Access the course git repository to review all pushed code and use the upcoming link for quick reference; ask questions in the Q&A if you get stuck.

  • Link to Git Repository0:02

Requirements

  • Basics of Java
  • Basics of Spring Boot

Description

This course aims at teaching all concepts of JUnit 5 Testing Framework with Detailed Explanation. Become Expert at Writing Test Cases of all Layers of Spring Boot Code.

This course includes creation of Read World - Industry Level Spring Boot Project containing all the layers of coding - Controller Layer, Service Layer, Entity Layer, Repository Layer, DTO Layer, Custom Exception Layer etc.

This course also includes connecting to Azure Database which includes creation of Resource Group, SQL Server, SQL Database, Creating Admin User etc in Azure.

Learn all these topics and many more with this course:


  1. Create a Spring Boot App

  2. @Test and Assertions

  3. Various ways to Run Test Methods

  4. Structuring Test Method - GIVEN WHEN THEN

  5. Assertion Error Message

  6. Assertions for boolean

  7. Assertions for null

  8. Multiple Assertions in a Test Method

  9. Assertions of Exception

  10. Static Import of Assertions

  11. @Disabled and fail()

  12. Build a Real Time Spring Boot Project

  13. Service Layer Basic Test

  14. @TestMethodOrder

  15. Service Layer Parameterized Test

  16. @ParameterizedTest

  17. @CsvFileSource

  18. @CsvSource

  19. @MethodSource

  20. @TestInstance

  21. @BeforeEach

  22. @AfterEach

  23. @BeforeAll

  24. @AfterAll

  25. Lifecycle Methods

  26. Code Coverage

  27. maven-surefire-report-plugin

  28. Jacoco

  29. Mockito

  30. @Mock

  31. Mockito.when()

  32. Mockito.then()

  33. Mockito.any()

  34. WebMvc - Testing Controller Layer

  35. @WebMvcTest

  36. @MockitoBean

  37. MockMvcRequestBuilders

  38. MockMvc

  39. Testing Entity Layer

  40. @DataJpaTest

  41. TestEntityManager

  42. Testing Repository Layer

  43. Query Methods - @Query

  44. Integration Testing - Testing All Layers Together

  45. @SpringBootTest Annotation with webEnvironment

  46. TestRestTemplate

  47. Azure Database

  48. TDD - Test Driven Development

Who this course is for:

  • Java and Spring Boot Developers who want to be expert at writing Test Cases