Get Free Shipping on orders over $0
Master Java Unit Testing with Spring Boot and Mockito - In28Minutes Official

Master Java Unit Testing with Spring Boot and Mockito

By: In28Minutes Official

eText | 25 May 2018 | Edition Number 1

At a Glance

eText


$239.79

or 4 interest-free payments of $59.95 with

 or 

Instant online reading in your Booktopia eTextbook Library *

Why choose an eTextbook?

Instant Access *

Purchase and read your book immediately

Read Aloud

Listen and follow along as Bookshelf reads to you

Study Tools

Built-in study tools like highlights and more

* eTextbooks are not downloadable to your eReader or an app and can be accessed via web browsers only. You must be connected to the internet and have no technical issues with your device or browser that could prevent the eTextbook from operating.

Learn to write awesome Java JUnit unit tests with Spring Boot, Mockito, JSONassert, Hamcrest, and JSONPath in 40 easy steps.

Key Features

  • Build the unit tests step-by-step in 40 easy steps
  • Write independent unit tests for RESTful web services talking with multiple layers—web, business, and data
  • Write awesome unit tests for simple RESTful services with Spring Boot Starter Test, Mockito, and JUnit

Book Description

Spring Boot is the most popular framework to develop RESTful services. It has awesome unit testing capabilities through the Spring Boot Starter Test. Mockito is the most popular mocking framework. JUnit is the most popular Java unit testing framework. You will build the unit tests step by step (in 40 easy steps).

This course would be a perfect first step as an introduction to unit testing with the Spring Boot and Mockito frameworks. You will be using Spring (dependency management), Spring Boot, Maven (dependency management), Eclipse (IDE), in-memory database H2 and Tomcat embedded web server. We will help you set up each one of these. You will use all the frameworks that are part of the Spring Boot Starter Test: JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert, and JSONPath. You will also learn how to use the most important unit testing annotations: @RunWith(SpringRunner.class), @SpringBootTest, @WebMvcTest, @DataJpaTest, and @MockBean.

By the end of this course, you will be able to write awesome unit tests for your RESTful services.

The code files and resource files are uploaded on the GitHub repository at https://github.com/packtpublishing/master-java-unit-testing-with-spring-boot-and-mockito

What you will learn

  • Write great unit and integration tests using Spring Boot Starter Test
  • Write unit tests using Mocks and Spys created with Mockito
  • Use Mock Mvc to test hello world controller
  • Use the most important unit testing annotations
  • Learn and use all frameworks of Spring Boot Starter Test
  • Write integration tests using an in-memory database, H2

Who this book is for

You are a Spring / Spring Boot / Java programmer, and you want to write awesome unit tests for your RESTful services. You want to write awesome unit tests with mocking. You want to understand the best practices in writing great unit tests with JUnit, Mockito, and Spring Boot Starter Test. You want to learn how to write great asserts with Hamcrest Matchers, JSONassert, Assert J, and JSON Path libraries.
on
Desktop
Tablet
Mobile

More in Web Programming

The Book of WebGPU - Mahesh Venkitachalam

eBOOK

RRP $86.02

$68.85

20%
OFF
JavaScript in Depth - James M. Snell

eBOOK