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

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

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

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

JUnit and Mockito Unit Testing for Java Developers

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

О курсе

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. Are you looking for a simple guide to learning unit testing? This video course is perfect for you. It includes hands-on exercises and best practices to help you understand JUnit and Mockito unit testing with ease. -The course starts with an introduction to unit testing and the importance of JUnit. -You'll create a Java project using JUnit and follow best practices for writing and running unit tests with JUnit and IntelliJ IDEA. -You'll also write mock object-based unit tests with Mockito and make powerful assertions using the Hamcrest assertions library included with JUnit. -By the end, you'll have the skills to write better unit tests using JUnit, Mockito, and Hamcrest. This course is suitable for Java developers and testers with basic Java knowledge who want to write unit tests using JUnit, Mockito, and Hamcrest. Learn modern unit testing concepts, run tests in the IDE, analyze code for quality tests, and compose readable assertions.

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

Unit TestingJUnitTest CaseJavaIntegrated Development EnvironmentsBuild ToolsSoftware ArchitectureSoftware TestingJava ProgrammingIntelliJ IDEAApache MavenTest Automation

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

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

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

Introduction

Welcome to the CourseВидеоFull Course ResourcesЧтениеOverview of the Course StructureВидео
02Unit Testing Foundations9 материалов

Unit Testing Foundations

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

Packt - Course Instructors

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

JUnit and Mockito Unit Testing for Java Developers
В каталоге вашей программы

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

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

Начать на Coursera

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

Обучение на Coursera

≈ 5.9 ч

6 модулей

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

Субтитры: Казахский

Часть программы вашего университета
Section IntroductionВидео
What is Unit Testing?Видео
What is JUnit?Видео
Introducing a Simple Unit Test in JUnitВидео
Structure of a Unit Test (Arrange-Act-Assert and Given/When/Then)Видео
Conventions for Writing Unit TestsВидео
Characteristics of Proper Unit TestsВидео
What are Assertions?Видео
Java Unit Testing with JUnitDIALOGUE
03Creating a Java Project Using JUnit6 материалов

Creating a Java Project Using JUnit

Section IntroductionВидеоCreating a Java Project Using the Maven Quickstart Archetype in JUnitВидеоIntroducing a Typical Java Project Structure (Production vs Test Source Trees)ВидеоUnderstanding the Basic Conventions for Creating Unit Tests (Package and Naming)ВидеоCreating a JUnit Project in IntelliJ with MavenDIALOGUEAssessment 1Задание
04Writing and Running Unit Tests with JUnit and IntelliJ IDEA14 материалов

Writing and Running Unit Tests with JUnit and IntelliJ IDEA

Section IntroductionВидеоCreating a Test Method with @Test AnnotationВидеоRunning a Unit Test Within the Integrated Development Environment (IDE) and Understanding Test SuccessВидеоUnderstanding Test Failures with ExceptionsВидеоFailing a Unit Test Explicitly with Assert.Fail()ВидеоUsing Assert.Fail() to Check Validation Logic in a Try/CatchВидеоIntroduction to the JUnit Assertions APIВидеоStructuring Unit Tests with Arrange-Act AssertВидеоUnderstanding the Execution of Assertions and JUnit's Fail-fast Test Failure MechanismВидеоAdding Descriptive Comments to Assertions and Test Failures to Aid DiagnosticsВидеоCoding a Unit Test Following Arrange-Act-AssertВидеоKeeping Test Setup (Don't Repeat Yourself) DRY with @BeforeВидеоUnderstanding Test Fixture InstantiationВидеоWriting Effective JUnit TestsDIALOGUE
05Using Testing with Mock Objects and Mockito14 материалов

Using Testing with Mock Objects and Mockito

Section IntroductionВидеоWhat Is Mockito and What Are Mock Objects?ВидеоIntroduction to Testing with Mock ObjectsВидеоConfiguring Projects Using MockitoВидеоCreating a Project Which Uses JUnit and MockitoВидеоCoding a Layered Architecture - Presentation LayerВидеоCoding a Layered Architecture - Business LayerВидеоCoding a Layered Architecture - Persistence LayerВидеоPutting the Correct Packages in Place to Respect the layeringВидеоWriting a Test for the Login Controller in the Presentation LayerВидеоUnderstanding the Test Fixture Setup While Writing Mock Object-based Unit TestsВидеоWriting a Test for the Authentication Service in the Business LayerВидеоThinking about Design Decisions When Unit TestingВидеоAdvanced Unit Testing with Mocking in JavaDIALOGUE
06Looking at Hamcrest Assertions Library28 материалов

Looking at Hamcrest Assertions Library

Section IntroductionВидеоEvolving the Domain and Repository ClassesВидеоIgnoring Tests with @ignoreВидеоImplementing a Finder in the RepositoryВидеоImplementing Business Logic in the ServiceВидеоConfiguring Maven to Use Java 8ВидеоEvolving the Repository ClassВидеоAdding a Parameter-driven Finder to the ServiceВидеоRefactoring to Evolve a New ServiceВидеоGenerating Test Methods in the IDE and Toggling Between Production and Test CodeВидеоIntroducing the JUnit Mockito Runner and @MockВидеоAnalyzing the Production Code to Determine How to Write the Arrange SectionВидеоUsing Mockito's @InjectMocks to Create the System Under Test with its DependenciesВидеоKeep Yourself Motivated by Checking the Happy Path Test OutputВидеоUsing the JUnit Assertions API to Write the Assert SectionВидеоThinking about the Weaknesses of the JUnit Assertions APIВидеоImportance of Checking Your Work as You Go!ВидеоUpgrading a JUnit Project to Use the Full Hamcrest VersionВидеоReplacing JUnit Assertions with Hamcrest Assertions and Using Assertions with CollectionsВидеоUnderstanding and Reading Hamcrest Test FailuresВидеоQuick Thoughts on Hamcrest Individual vs Collection AssertionsВидеоDo Not Invoke Unneeded Production Code in Your Test ClassesВидеоUnderstanding Evaluation of Hamcrest MatchersВидеоThinking about Keeping Production Code to a Minimum in TestsВидеоCreating Complex Hamcrest Assertions with allOf Method and Property MatchersВидеоAssessment 2ЗаданиеFull Course Practice AssessmentЗаданиеFull Course AssessmentЗадание