WireMock for Java Developers

Learn to build robust RESTFUL API Clients, Service Virtualization in Java and SpringBoot applications using WireMock.

4.90 (228 reviews)
Udemy
platform
English
language
Software Engineering
category
WireMock for Java Developers
1,468
students
4.5 hours
content
Mar 2024
last update
$69.99
regular price

What you will learn

This course will help the students to learn about “how to write unit tests” which involves RESTFUL API integrations.

Build REST API Clients using Spring Webclient

Write Unit Tests that covers all the possible scenarios in a REST based interaction

Mock an External Service using WireMock

Build a robust REST Client by simulating Network Errors

Build a robust REST Client by simulating Network Latency

Unit Test the timeout of the REST Client

Why take this course?

WireMock is a simulator for HTTP-based APIs or MockServer.

REST APIs are everywhere today as it's the modern and easiest way to build a functionality and expose it to the real world.

When it comes to writing Unit Test Cases that involve REST-based interactions there is always a challenge in testing error responses , network faults, latency and timeouts. WireMock is going to solve this problem of the application code that depends on the external service by mocking the actual service.

In MicroServices Architecture, It is pretty common for services to depend on one other and it's always a challenge to write test cases for the code that depends on other external services. WireMock provides the necessary tools to simulate an external service so the code that depends on the external service can be tested which helps to build the robust REST Client.

This course is going to cover the techniques that are listed below using WireMock:

  • Service Virtualization

  • Simulating the External Service

  • Simulating Latency

  • Simulating Error response

  • Simulating Network errors

Learn to integrate the most powerful HTTP Mock library - WireMock into your application to build a Resilient and Robust REST API clients.

Why you should use WireMock ?

  • If your application depends on an API that does not exist but still you would like to build the REST Client then WireMock can help support that kind of development.

  • If you would to cover all the edge cases scenarios such as NetWork Errors, Faults, Latency and RunTime Exception in your REST Client then start using WireMock

  • If you would like to write Unit Test cases that covers all the possible scenarios that can happen in a REST based interaction then start using WireMock.

  • In a MicroServices Architecture it is pretty common for your services to depend on other. WireMock is a powerful simulation tool to simulate the service that your application depends on it. In a nutshell, WireMock is a Service Virtualization tool.

What's Covered in this Course?

  • Introduction to WireMock

  • Learn to build REST Client using the Spring WebClient.

  • Learn to virtualize an External Service

  • Learn to create Stubs using WireMock

  • Learn to Simulate Network Errors, Latency, Network Timeouts and more.

  • Learn to run WireMock using JUnit4 and JUnit5 platform

  • Learn to integrate and run WireMock in Spring Boot application

Prerequisites for the Course:

  • Experience working with Java applications

  • Java 8 or Higher

  • Knowledge of building RESTFUL API Clients

  • Knowledge of RESTFUL API

  • Experience working with Gradle/Maven

  • Experience working with Intellij, Eclipse etc.,

Section : Introduction to WireMock

In this section, I will cover the Introduction to WireMock from the theoretical perspective.

  • Why WireMock ?

  • What is WireMock ?

  • WireMock vs Mocking Libraries - A quick comparison between WireMock and Mockito.

Section : Setting up the WorkSpace for the course

  • In this section, we will set up the workspace for this course.

Section : Build REST Clients using Spring WebClient - Hands On

In this section, we will code and learn how to build a REST client using WebClient.

  • Set up the base project movies-app for this course

  • Build the Rest Clients that will be used throughout the course using Spring WebClient

  • Build Rest Clients that covers the HTTP Methods such as GET, POST, PUT and DELETE

Section : Setting Up WireMock

In this section we will configure the WireMock in to our movies-app project.

Section : Build Stubs Using WireMock - Hands On

In this section, we will code and learn about how to create Stubs using wiremock and have test case interact with wiremock instead of the actual service.

  • Learn about how to create stubs using WireMock

  • Learn to create stubs for different HTTP Methods such as GET, POST, PUT and DELETE

  • Learn to Simulate HTTP Responses with 400-Bad Request

  • Learn about how to perform ResponseTemplating in WireMock

Section: Verifying the Stubs - Hands On

In this section ,I will cover about how to make sure the stubs are invoked as expected by using the Verification DSL.

  • Explore the Verify DSL in WireMock

Section : Simulating Server/Fault Responses - Hands On

In this section , I will cover how to simulate the fault HTTP responses such as 5xx Errors, Fault Responses using WireMock.

  • Learn about the difference between ServerError and Fault responses

  • Learn to simulate a Server Error using WireMock

  • Learn to simulate a Network Error using WireMock

Section : Simulating Latency - Hands On

In this section, I will cover how to configure Timeout and simulate latency so that the client times out if the response is not received within the configured time.

  • Learn to configure the timeout in the REST Client

  • Learn to Simulate Latency and test your REST Client times out as expected

Section : Selective Proxying - Hands On

In this section, we will learn about "What is Selective proxying?" and "how to implement Selective proxying" using Wiremock.

  • Learn about What is Selective Proxying? and When to use Selective Proxying?

  • Learn to simulate Selective Proxying using WireMock

Section : Running WireMock on JUnit4

In this section, we will code and learn how to run a wiremock on a JUnit4 based environment.

Section : Running WireMock on Spring Boot - Hands On

In this section, I will cover how to run and configure WireMock in a Spring Boot project.

Section: Running WireMock with Spring Boot and JUnit5

In this section, we will code and learn about how to run the Spring Boot Project in a JUnit5 environment.

By completing this course, you will have a pretty good idea about the following:

  • How to Integrate WireMock in to your project

  • How to Build resilient RESTFUL API Clients

Thanks for taking your time to view my course and hope to see you in my course.

Reviews

Vijay
August 15, 2023
Great work Dilip, good focus and coverage of topics from the instructor. Can't wait to finish the course
John
August 22, 2022
The app was not Test Driven even though JUNIT tests were used throughout. This results in at least one test with a false positive. Classes should follow best practices instead of using Test AFTER development. TDD is how code should be written. Devs don't follow this practice because most tutorials don's show it in the context of something else they want to learn. That is a shame.
Aziz
August 21, 2022
Super clear explanations. A little too basic for my taste but I really, really like teaching his style.
Claudiu
April 18, 2022
This course is to get in touch with the WireMock concepts (not more). You can do this easily reading the documentation and writing some small tests, but I needed something to help me to understand basics much quicker (about a day) and it was exactly that. Concepts explained well, everything is hands on. Small problems with the code (like the repository in the graddle setup), but easy to figure why and in the end helps you to understand how to fix problems. I also liked the style to make mistakes by purpose in order to figure what was wrong and to correct it. Thank you.
Olanre
November 9, 2021
Having worked extensively with Mocito , This WireMocks course help to expand my knowledge of the testing and increase the options available to me when writing tests for my API
Prsharma
May 1, 2021
In this course Wiremock Embedded feature was explained nicely. But Wiremock Standalone feature was not covered.
Grzegorz
January 26, 2021
Very good course, which covers quite wide area of Wire Mock. A little too long chapters about creating WebClient endpoints, lack of at least small example of RestTemplate testing with Wire Mock are some small drawbacks. Very good explanation (with practical examples) of using Wire Mock in differently configured Spring Boot projects (JUnit4, JUnit5, AutoConfigureWireMock, Wire Mock Extension).
Guo
July 8, 2020
This training is meant for Developers, for a testautomation engineer is good to understand how mocking (wiremock) works.
Kanaka
May 19, 2020
The course does not meet my expectations, not to say that course is bad, but it is just not what I expect. I need a refund, I do not want to continue this course anymore
Sashank
April 7, 2020
Hi Dillip, It's a good course with nice explanation. But there should be a section added to mock a soap client like you did for the Rest Client. Without that section, the course would be incomplete. Please take this into consideration and thank you again for creating this course.
Mohit
March 5, 2020
I was looking for some indepth technical knowledge about how to setup own mock server using wiremock and not writing test cases with it. The course lacks details about many features like recording and playback in wiremock. Totally disappointed.
Franz
March 3, 2020
This course was definitely a great material. It is a very useful and interesting technology, especially applicable to the development of software based on microservices architecture. I learned a lot!. A point to take into account to take this course is: This course is not for beginners, since if you do not have an experience in the development of services, spring framework, dependency injection and others related to java technology, you probably will not be able to understand the course very well.
Vijayakarthikeyan
February 24, 2020
Explanation is so good and perfect which we can follow . And appreciate this course which I was badly looking for .
Gajanan
December 20, 2019
Concepts/Topics details explanations would have really help like What is stub ? Behind scenes working of WireMock is not enough explanatory. Including diagram would have been made it better for understanding

Charts

Price

WireMock for Java Developers - Price chart

Rating

WireMock for Java Developers - Ratings chart

Enrollment distribution

WireMock for Java Developers - Distribution chart
2339804
udemy ID
4/26/2019
course created date
11/22/2019
course indexed date
Bot
course submited by