К содержимому
learnspaceYOUR NEXT CHAPTER
ПРОСТРАНСТВО ОБУЧЕНИЯ
ГлавнаяКаталог курсовМоё обучениеCoursera

Знания без границ

Учитесь у лучших университетов и компаний мира.

Открыть Coursera
Интеграция
Пространство университета
Моё пространствоСтраница курса
↵
ЯЛичный кабинетСтудент
© 2026 LearnSpaceКаждый день — возможность узнать больше.Помощь
Master Java Unit Testing with Spring Boot and Mockito · LearnSpace
Назад в каталог
courseraПрограммирование

Master Java Unit Testing with Spring Boot and Mockito

Курс от Packt
Средний≈ 5.8 чАнглийский
О курсеНавыкиПрограммаПреподаватели

О курсе

Updated in May 2025. This course now features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. In this course, you will embark on a journey to master unit testing using Mockito and Spring Boot. Starting with an introduction to Mockito, you'll learn how to set up your projects using Spring Initializr and write your first unit tests. As you progress, you'll delve deeper into creating business services, utilizing stubs, and updating tests to use Mockito effectively. The course meticulously guides you through various unit testing scenarios, including setting up business services to call data services, writing unit tests with stubs, and mocking using Mockito. You'll explore advanced techniques such as refactoring with @Mock, @InjectMocks, and @RunWith(MockitoJUnitRunner), and learn valuable tips for argument matchers, verify method calls, and argument capture. In the final sections, the focus shifts to integrating Mockito with Spring Boot. You'll create and test RESTful services, work with data layers using JPA and Hibernate, and perform integration tests with @SpringBootTest. Each module is designed to build on the previous one, ensuring a seamless and comprehensive learning experience. This course is ideal for Java developers with a basic understanding of Spring Boot who are looking to enhance their unit testing capabilities. A fundamental knowledge of Java and familiarity with basic Spring Boot concepts are prerequisites.

Навыки, которые вы освоите

Unit TestingHibernate (Java)Web ServicesJUnitIntegration TestingBusiness LogicTest ToolsDevelopment TestingSoftware TestingRestful API

Программа курса

4 модулей · 52 учебных материалов

01Introduction3 материалов

Introduction

IntroductionВидеоFull Course ResourcesЧтениеCourse OverviewВидео
02Mocking with Mockito17 материалов

Mocking with Mockito

Учитесь у экспертов

Packt - Course Instructors

Преподаватель курса

Master Java Unit Testing with Spring Boot and Mockito
В каталоге вашей программы

Инвестируйте в себя

Новые знания — в удобное для вас время.

Начать на Coursera

Обучение откроется на Coursera
в новой вкладке

Обучение на Coursera

≈ 5.8 ч

4 модулей

Язык: Английский

Часть программы вашего университета
Step 00 - Section Introduction - Mocking with MockitoВидео
Step 01 - Setting Up the Project Using Spring InitializrВидео
Step 02 - Writing a Unit Test for a Simple Business ServiceВидео
Step 03 - Setting Up a Business Service to call a Data ServiceВидео
Step 04 - Writing Your First Unit Test with StubВидео
Step 05 - Exercise Solution - Updating Tests 2 and 3 to Use StubВидео
Step 06 - Writing Unit Tests with Mocking Using MockitoВидео
Step 07 - Exercise Solution - Updating Tests 2 and 3 to Use MockitoВидео
Step 08 - More Refactoring - @Mock, @InjectMocks, and @RunWith(MockitoJUnitRunner)Видео
Step 09 - Mockito Tips - Multiple Return Values and Specific Argument MatchersВидео
Step 10 - Mockito Tips - Argument MatchersВидео
Step 11 - Mockito Tips - Verify Method CallsВидео
Step 12 - Mockito Tips - Argument CaptureВидео
Step 13 - Mockito Tips - Argument Capture on Multiple CallsВидео
Step 14 - Introduction to SpyВидео
Step 15 - Mockito FAQsВидео
Mocking and Spying with MockitoDIALOGUE
03Unit Testing with Spring Boot and Mockito29 материалов

Unit Testing with Spring Boot and Mockito

Step 00 - Section Introduction - Unit Testing with Spring Boot and MockitoВидеоStep 01 - Creating a Hello World ControllerВидеоStep 02 - Using MockMvc to Test the Hello World ControllerВидеоStep 03 - Using Response Matchers to Check Status and ContentВидеоStep 04 - Creating a Basic REST Service in Item ControllerВидеоStep 05 - Unit Testing Item Controller and Basic JSON AssertionsВидеоStep 06 - Digging Deeper into JSONassertВидеоStep 07 - Writing a REST Service talking to Business LayerВидеоStep 08 - Writing Unit Test for REST Service Mocking Business LayerВидеоStep 09 - 00 - Overview of Steps 09 to 15ВидеоStep 09 - 01 - Prepare Data Layers with JPA, Hibernate, and H2ВидеоStep 10 - Create Item Entity and Populate Data with data.sqlВидеоStep 11 - Create a RESTful Service Talking to the DatabaseВидеоStep 12 - Writing Unit Test for Web Layer - Controller - Using MockMvcВидеоStep 13 - Exercise and Solution - Writing Unit Test for Business Layer ? MockingВидеоStep 14 - Writing Unit Test for Data Layer - Data JPA TestВидеоStep 15 - Writing an Integration Test Using @SpringBootTestВидеоStep 16 - Tip - Using @MockBean to Mock Out Dependencies that are Not RequiredВидеоStep 17 - Tip - Creating Different Test ConfigurationВидеоStep 18 - Writing Unit Tests for Other Request MethodsВидеоStep 19 - Refactor SomeBusinessImpl to Use Functional ProgrammingВидеоStep 20 - Better Assertions with Hamcrest ? HamcrestMatcherTestВидеоStep 21 - Better Assertions with AssertJ ? AssertJTestВидеоStep 22 - Better Assertions with JSONPath ? JSONPathTestВидеоStep 23 - Tip Patterns ? xunitpatternsВидеоStep 24 - Tip - Measuring Test Coverage with EclipseВидеоStep 25 - Tip - Keep an Eye on Performance of Unit Tests!ВидеоStep 26 - Good Unit TestsВидеоTesting RESTful Web Services with Spring BootDIALOGUE
04Congratulations3 материалов

Congratulations

Next StepsВидеоFull Course Practice AssessmentЗаданиеFull Course AssessmentЗадание