Mô tả

In modern software development having proper automated test coverage is considered a best practice. In this course you will learn how to test Java and Spring Boot applications using highly popular open source tools.

You will see in the first section of this course, the software testing ecosystem is very diverse. JUnit and Mockito are two of the leading testing libraries for Java. JUnit provides the test execution context, while Mockito give you power mocking capabilities. Together these libraries can be used to write unit tests, integration tests, and functional tests. You will also learn why having proper test coverage is critical to supporting other popular agile practices such as Continuous Integration and Continuous Deployment (aka CI/CD).

Agile teams all over the world consider Test Driven Development (TDD) a critical technique for producing quality software. This course begins by using JUnit 5 to demonstrate how to use TDD to create a simple Java application, then again using TDD to evolve the application to a higher level of quality and functionality.

Next, the course takes you into a deep dive of the features and functionality of JUnit 5. You will learn how to write JUnit 5 unit tests for a Java web application.

The primary focus of this course is on the JUnit 5 release. There are some very notable differences between JUnit 4 and JUnit 5. This course contains a dedicated section showing you how to migrate your JUnit 4 tests to JUnit 5.

As your testing needs become more complex, you will need to mock dependent objects.

Not sure what a mock is? It's effectively a test double. An object created for unit testing.

Mockito is the most popular mocking library used by Java developers.

If you are writing Spring Framework applications, you're likely to be injecting dependent objects into your classes. You will learn how to use the robust mocking capabilities of Mockito to mock dependent objects in your unit tests.

The first 11 sections of the course focus heavily on unit testing with JUnit 5 and Mockito. This is to help you establish a strong unit testing foundation before we start testing Spring Boot applications.

You will have no doubts when it comes to testing Java classes using JUnit 5 and Mockito.

The Spring Framework itself has some very robust testing capabilities.

We start learning to test the Spring Framework by adding the Spring Framework Testing context to our tests.

This allows us to leverage the Spring Framework's Dependency Injection capabilities right in our tests.

Properly testing Spring MVC controllers can always be a little tricky. You need to test all the things you are expecting the Spring Framework to handle for you around calls to your controllers.

This is where Spring MVC Test steps in. You will see how you can use Spring MVC Test with JUnit 5 and Mockito to properly test your Spring MVC Controllers.

The course continues showing you how to use Spring Boot test splices to bring up a minimal Spring Boot configuration for the testing of a Spring MVC RESTful controller.

Another powerful Spring project is Spring MVC REST Docs. This is a project which allows you to generate API documentation from your Spring Mock MVC tests.

Inside this course you will learn:

  • JUnit 5

  • AssertJ

  • Hamcrest Matchers

  • Mockito 2

  • Test Driven Development (TDD)

  • Behavior Driven Development (BDD) with Mockito

  • Migrating to JUnit 5 from JUnit 4

  • Running JUnit 5 tests from Maven

  • Running JUnit 5 tests from Gradle

  • Use CircleCI with Maven for Continuous Integration Testing

  • Spring MVC Test

  • JsonPath

  • Wiremock

  • Spring MVC REST Docs

Course Extra - IntelliJ IDEA Ultimate

Students enrolling in the course can receive a free 120 day trial license to IntelliJ IDEA Ultimate! Get hands on experience using the Java IDE preferred by Spring Framework professionals! 

Course Extra - Access to a Private Slack Community

You're not just enrolling in a course --> You are joining a community learning about testing Spring.

With your enrollment to the course, you can access an exclusive Slack community. Get help from the instructor and other Spring Framework Gurus from around the world - in real time! This community is only available to students enrolled in this course. 

This is a very active Slack community with over 1,000 Spring Framework Gurus!

This is the largest online community of people learning Spring in the world.

With your enrollment, you can join this community of awesome gurus!

Source Code Access

All course source code is available in GitHub. When you enroll, refer to the lesson resources for links to GitHub.

Closed Captioning / Subtitles

Closed captioning in English is available for all course videos!

PDF Downloads

All keynote presentations are available for you to download as PDFs.

Lifetime Access

When you purchase this course, you will receive lifetime access! You can login anytime from anywhere to access the course content.

No Risk - Money Back Guarantee 

You can buy this course with no risk. If you are unhappy with the course, for any reason, you can get a complete refund. The course has a 30 day Money Back Guarantee.

Enroll today and start learning about the latest tools and best practices for testing your Spring Boot applications! 

Bạn sẽ học được gì

Learn Important Concepts behind Test Driven Development

Understand different types of testing - Unit, Integration, Functional

Master the JUnit 5 Testing API

Easily integrate Mockito with JUnit 5 Tests

Migrate JUnit 4 tests to JUnit 5

Test Spring Framework Applications with JUnit 5 and Mockito

Write Unit Tests with Spring MVC Test

Learn to use testing features of Spring Boot

Yêu cầu

  • Java Programing
  • Spring Framework
  • Spring Boot
  • Basic SQL Skills
  • IntelliJ or Eclipse

Nội dung khoá học

20 sections

Introduction

7 lectures
Meet Your Instructor
01:38
Introduction to Testing Spring Boot - Beginner to Guru
02:02
Getting the Most out of your Testing Spring Boot Course
08:59
Is Your IDE Free Like a Puppy?
04:00
IntelliJ 120 Day Trial
00:42
Slack Community Exclusive to Testing Spring Boot Course!
00:51
GitHub Workflow
12:20

Introduction to Testing Software

6 lectures
Introduction
01:39
Introduction to Testing Software
14:28
JUnit Test Example
04:29
Common Testing Frameworks for Java
09:24
Beyond Testing with CI and CD
11:00
Conclusion
01:39

Test Driven Development By Example

21 lectures
Introduction
02:44
TDD By Example Kent Beck
07:47
Development Requirements and Base Project
04:21
Multi-Currency Money
11:30
Degenerate Objects
04:54
Equality for All
04:32
Privacy
02:52
Franc-ly Speaking
04:25
Equality for All, Redux
04:26
Apples and Oranges
03:11
Makin' Objects
07:53
Times We're Livin' In
07:22
Interesting Times
07:13
The Root of All Evil
03:53
Addition, Finally
08:36
Make It
15:06
Change
16:14
Mixed Currencies
05:21
Abstraction, Finally
06:39
Viewing Test Coverage from IntelliJ
09:21
Conclusion
01:30

Getting Started with JUnit 5

10 lectures
Introduction to Getting Started with JUnit 5
01:03
Introduction to JUnit 5
08:48
JUnit Maven Project Setup
06:43
JUnit Hello World Test
05:15
Initializing Properties with JUnit 5 @BeforeEach
03:54
JUnit 5 Test Instance Lifecycle Demo
04:34
Running JUnit 5 Tests from Command Line with Maven
05:09
JUnit Gradle Project Setup
04:41
Running JUnit 5 Tests from Command Line with Gradle
02:54
Conclusion of Getting Started with JUnit 5
00:57

Testing Java with JUnit 5

17 lectures
Introduction to Testing Java with JUnit 5
00:52
Java Test Project Code Review
05:00
Overview of JUnit Assertions
05:27
JUnit Assertions
05:22
JUnit Grouped Assertions
06:22
JUnit Dependent Assertions
04:59
Skipping JUnit Tests
04:14
JUnit Test Display Names
02:38
Testing Expected Exceptions
04:33
Testing Timeouts
05:25
JUnit Assumptions
03:59
Conditional JUnit Test Execution
05:32
Using AssertJ with JUnit
03:48
Using Hamcrest with JUnit
05:09
Assignment - Write JUnit Test for Vet Controller List Vets
03:18
Assignment Review - Write JUnit Test for Vet Controller List Vets
12:47
Conclusion
00:50

Advanced JUnit Testing

19 lectures
Introduction to Advanced JUnit Testing
01:05
Tagging and Filtering JUnit Tests
04:05
JUnit Nested Tests
07:19
JUnit Test Interfaces
03:18
Using JUnit Default Test Methods
02:56
Repeating Tests with JUnit 5
03:30
JUnit Test Dependency Injection
04:13
Assignment - JUnit Dependency Injection
01:29
Assignment Review
09:56
JUnit Parameterized Tests - Value Source
04:50
JUnit Parameterized Test - Display Name
02:25
JUnit Parameterized Tests - ENUM Source
02:44
JUnit Parameterized Tests - CSV Source
04:00
JUnit Parameterized Tests - CSV File Source
04:27
JUnit Parameterized Tests - Method Provider
04:29
JUnit Parameterized Tests - Custom Provider
03:09
Unit Tests vs Integration Tests
02:57
JUnit Extensions
03:27
Conclusion
01:12

Test Execution

13 lectures
Introduction
01:33
Running Tests from IDE
04:05
Maven Surefire Plugin
03:56
Maven Failsafe Plugin
04:02
Maven SurefireTest Reporting
05:07
Executing JUnit Test with Tags in Maven
03:36
Running Tests from CI Builds With Maven
07:20
CircleCI Build Badge
02:24
Gradle Project Overview
05:10
Running JUnit Tests from Gradle
03:40
Integration Tests With Gradle
02:44
Gradle JUnit Test Reports
03:06
Conclusion
01:16

JUnit 4 to JUnit 5 Migration Guide

7 lectures
Introduction
02:47
JUnit 4 Example Project
03:00
Differences Between JUnit 4 and JUnit 5
05:31
JUnit 5 Maven Dependencies and Configuration
05:21
Converting JUnit 4 Tests to JUnit 5
03:25
Removing JUnit 4
02:33
Conclusion
01:20

Getting Started with Mockito

15 lectures
Introduction
02:14
Introduction to Mockito
04:36
Maven Dependencies for Mockito
02:45
Creating Mockito Mocks Inline
02:51
Creating Mockito Mocks with Annotations
03:14
JUnit Mockito Extension
02:59
Injecting Mocks with Mockito
04:33
Verify Interactions With Mockito Mocks
04:08
Assignment - Write Mockito Tests for Vet Service
01:43
Assignment Review
03:46
Returning values from Mockito Mocks
04:15
Argument Matchers
02:52
Assignment - Complete Tests for Visit Service
02:01
Assignment Review
10:50
Conclusion
01:59

Behavior Driven Mockito

8 lectures
Introduction
00:50
Introduction to Behavior Driven Development
02:33
BDD Mockito
03:25
BDD Verification in Mockito
03:44
Refactoring Speciality Service to BDD
06:08
Assignment - BDD Visit Service
01:07
Assignment Review
06:37
Conclusion
00:32

Advanced Mockito

12 lectures
Introduction
00:30
Throwing Exceptions with Mockito
07:12
Java 8 Lambda Argument Matchers
05:37
Assignment - Write Controller Test
02:17
Assignment Review
11:38
Mockito Argment Capture
09:07
Using Mockito Answers
13:43
Verify Order of Interactions
04:55
Verify Interactions within Specified Time
05:00
Verify Zero or No More Interactions with Mock
04:47
Using Mockito Spies
08:15
Conclusion
00:57

Testing with Spring Framework

6 lectures
Introduction to Testing with Spring Framework
00:45
Overview of Spring Framework Unit Testing Features
07:23
Spring Pet Clinic Code Review
05:10
Assignment - Write Spring Unit Tests
01:51
Assignment Review
14:50
Conclusion
00:39

Spring Framework Testing Context

16 lectures
Introduction
01:20
Yanny or Laurel?
02:48
Yanny or Laurel Service Beans
08:05
JUnit 4 Laurel Test
08:20
Assignment Create Yanny JUnit 4 Test with Spring Context
00:44
Assignment Review Create Yanny JUnit 4 Test with Spring Context
03:53
JUnit 5 Laurel Test
04:12
Assignment Create Yanny JUnit 5 Test with Spring Context
00:49
Assignment Review Create Yanny JUnit 5 Test with Spring Context
03:50
Using Inner Class Configuration
03:09
Using Component Scans
05:17
Setting Active Profiles for Tests
08:16
Spring Test Properties
05:14
Assignment - Create Profile for Properties
00:55
Assignment Review
04:51
Conclusion
01:19

Spring MVC Test

14 lectures
Introduction
01:27
Spring MVC Test Overview
04:57
Spring Mock MVC Standalone Setup
10:51
Spring Web Configuration with XML
05:59
Assignment - Test Get Method with Spring MVC Test
01:14
Assignment Review
07:16
Using Spring MVC Test with Form Parameters
05:34
Assignment - Complete Tests for Find Form
02:46
Assignment Review
13:59
Use Spring MVC Test For Form Post
05:41
Use Spring MVC Test to Test for Validation Errors
06:00
Assignment - Use Spring MVC Test with Form Post
01:52
Assignment Review
05:12
Conclusion
01:02

Introduction to Testing with Spring Boot

8 lectures
Introduction
00:37
Overview of Testing with Spring Boot
10:00
Default Spring Boot Test Configuration
08:35
Updating Spring Boot 2.x to JUnit 5
05:50
Assignment - Configure CircleCI
01:58
Assignment Review
04:51
Code Review of SFG Brewery Project
09:22
Conclusion
00:32

Spring MVC Rest Controller Tests

10 lectures
Introduction
01:00
Jayway JsonPath
02:53
Using JsonPath in MockMVC Tests
07:32
Using JsonPath with Lists
08:43
Using Custom Message Converters with Spring MVC Test
08:00
@WebMVC Test Slice
04:48
Using Test RestTemplate
07:24
Assignment - Write Spring MVC Tests for Get Orders
01:27
Assignment Review
11:48
Conclusion
00:52

Testing with Wiremock

7 lectures
Introduction
01:02
Introduction to Wiremock
04:50
Wiremock Standalone Use
06:19
Recording with Wiremock
05:16
Testing with Wiremock
17:54
Importance of Test Performance
04:29
Conclusion
00:54

Spring MVC REST Docs

16 lectures
Introduction
02:01
Spring REST Docs Introduction
05:06
Project Code Review
05:54
Maven Configuration
06:20
Spring Mock MVC Configuration
04:32
Documenting Path Parameters
06:08
Documenting Query Parameters
02:26
Documenting Responses
03:12
Documenting Requests
04:12
Documenting Validation Constraints
10:41
URI Customization
03:17
Documentation Generation
08:53
Serving Docs with Spring Boot
04:03
Assignment - Add Spring REST Doc to Project
02:25
Assignment Review
07:24
Conclusion
01:53

Appendix A

2 lectures
Git and GitHub Basics - Start here!
00:44
GitHub Workflow
12:20

Appendix B: Spring Framework Videos from Udemy YouTube

3 lectures
Kube By Example - Building a Spring Boot Docker Images
56:33
Kube By Example - Spring Boot on Kubernetes
47:46
Kube By Example - Spring Boot Microservices on Kubernetes
01:51:22

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.