UDEMY
UDEMY Logo

Master Java Unit Testing with Spring Boot & Mockito 

  • Offered byUDEMY

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 
Overview

Learn to write awesome Java JUnit unit tests with Spring Boot, Mockito, JsonAssert, Hamcrest & JsonPath in 40 easy steps

Duration

4 hours

Total fee

3,499

Mode of learning

Online

Credential

Certificate

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 
Highlights

  • Earn a Certificate of completion from Udemy
  • Get a 30 days money back guarantee on the course
  • Get full lifetime access of the course material
  • Learn from 8 downloadable resources and 1 articles
Read more
Details Icon

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 
Course details

Who should do this course?
  • For Spring/Spring Boot/Java Programmer
What are the course deliverables?
  • Learn to write great unit and integration tests using spring boot starter test from scratch
  • Learn to write unit tests using mocks and spys created with mockito
  • Use all the frameworks in spring boot starter test - JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert and JsonPath
  • Learn to Write Integration Tests using an IN MEMORY DATABASE - H2
More about this course
  • This course is a great introduction to unit and integration testing using Spring Boot, Mockito, and a number of other libraries that can help to write effective tests
  • It is easy to follow along with and has plenty of references where to look for more information
  • Spring Boot is the most popular framework to develop RESTful Services. It has Awesome Unit Testing capabilities through Spring Boot Starter Test
  • Learn to Write Great Unit Tests for Simple RESTful Services with Spring Boot Starter Test, Mockito and JUnit
  • Learn to write independent unit tests for RESTful web services talking with multiple layers - web, business and data
  • This course would be a perfect first step as an introduction to unit testing with Spring Boot and Mockito Frameworks
Read more

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 
Curriculum

Introduction

Course Overview

Mocking with Mockito

Step 00 - Section Introduction - Mocking with Mockito

Step 01 - Setting up the project using Spring Initializr

Step 02 - Writing 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 & 3 to use Stubs

Step 06 - Writing Unit Tests with Mocking using Mockito

Step 07 - Exercise Solution - Updating Tests 2 & 3 to use Mockito

JUnit 5 Alert

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 FAQ

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 Mock Mvc to test 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 JSON Assert

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 Mock MVC

Step 13 - Exercise & 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 you do not want to talk

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

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 
Entry Requirements

Eligibility criteriaUp Arrow Icon
Conditional OfferUp Arrow Icon
  • Not mentioned

Other courses offered by UDEMY

549
50 hours
– / –
3 K
10 hours
– / –
549
4 hours
– / –
399
19 hours
– / –
View Other 2351 CoursesRight Arrow Icon
qna

Master Java Unit Testing with Spring Boot & Mockito
 at 
UDEMY 

Student Forum

chatAnything you would want to ask experts?
Write here...