WireMock for Java Developers

所在平台: Udemy

课程主页: https://www.udemy.com/course/wiremock-for-java-developers/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:Java开发者的WireMock 课程概述:WireMock是一个用于HTTP基础API模拟的工具或MockServer。随着REST API的广泛应用,编写涉及REST交互的单元测试案例时,测试错误响应、网络故障、延迟和超时等问题成为了一大挑战。WireMock能够解决这些依赖外部服务的应用代码问题,通过模拟实际服务解决测试难题。在微服务架构中,服务之间相互依赖十分常见,而WireMock提供了必要的工具来模拟外部服务,使得依赖于外部服务的代码能够进行有效的测试,从而帮助构建强健的REST客户端。 本课程将涵盖以下使用WireMock的技术: - 服务虚拟化 - 模拟外部服务 - 模拟延迟 - 模拟错误响应 - 模拟网络错误 学习如何将最强大的HTTP Mock库WireMock集成到您的应用中,以构建具备韧性和强大功能的REST API客户端。 使用WireMock的理由: - 如果您的应用依赖于一个尚不存在的API,但您仍希望构建REST客户端,WireMock将大大帮助您支持此类开发。 - 如果您希望涵盖所有边缘情况,例如网络错误、故障、延迟和运行时异常,请开始使用WireMock。 - 如果您希望编写单元测试案例,涵盖所有可能发生的REST交互场景,请开始使用WireMock。 - 在微服务架构中,服务之间的相互依赖非常普遍,而WireMock是一个强大的模拟工具,可以模拟您的应用所依赖的服务。 课程内容包括: 1. 介绍WireMock 2. 使用Spring WebClient构建REST客户端 3. 虚拟化外部服务 4. 使用WireMock创建Stubs 5. 模拟网络错误、延迟和超时 6. 使用JUnit4和JUnit5运行WireMock 7. 在Spring Boot项目中配置和运行WireMock 课程前提条件包括: - 具备Java应用工作经验 - 熟悉Java 8及以上版本 - 理解如何构建RESTful API客户端 - 了解Gradle/Maven的使用 - 掌握IntelliJ、Eclipse等IDE的使用 通过完成本课程,您将获得: - 如何在项目中集成WireMock - 如何构建健壮的RESTful API客户端 感谢您花时间查看我的课程,希望在课程中见到您。

课程评论(0条)

课程详情

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 VirtualizationSimulating the External ServiceSimulating LatencySimulating Error response Simulating Network errorsLearn 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 WireMockIf 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 ServiceLearn to create Stubs using WireMockLearn to Simulate Network Errors, Latency, Network Timeouts and more.Learn to run WireMock using JUnit4 and JUnit5 platformLearn to integrate and run WireMock in Spring Boot applicationPrerequisites for the Course:Experience working with Java applicationsJava 8 or HigherKnowledge of building RESTFUL API ClientsKnowledge of RESTFUL APIExperience working with Gradle/MavenExperience working with Intellij, Eclipse etc.,Section: Introduction to WireMockIn 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 courseIn this section, we will set up the workspace for this course.Section: Build REST Clients using Spring WebClient - Hands OnIn this section, we will code and learn how to build a REST client using WebClient.Set up the base project movies-app for this courseBuild the Rest Clients that will be used throughout the course using Spring WebClientBuild Rest Clients that covers the HTTP Methods such as GET, POST, PUT and DELETESection: Setting Up WireMockIn this section we will configure the WireMock in to our movies-app project.Section: Build Stubs Using WireMock - Hands OnIn 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 WireMockLearn to create stubs for different HTTP Methods such as GET, POST, PUT and DELETELearn to Simulate HTTP Responses with 400-Bad RequestLearn about how to perform ResponseTemplating in WireMockSection: Verifying the Stubs - Hands OnIn 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 WireMockSection: Simulating Server/Fault Responses - Hands OnIn 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 responsesLearn to simulate a Server Error using WireMockLearn to simulate a Network Error using WireMockSection: Simulating Latency - Hands OnIn 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 ClientLearn to Simulate Latency and test your REST Client times out as expectedSection: Selective Proxying - Hands OnIn 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 WireMockSection: Running WireMock on JUnit4In this section, we will code and learn how to run a wiremock on a JUnit4 based environment.Section: Running WireMock on Spring Boot - Hands OnIn this section, I will cover how to run and configure WireMock in a Spring Boot project.Section: Running WireMock with Spring Boot and JUnit5In 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 ClientsThanks for taking your time to view my course and hope to see you in my course.

课程标签

0人关注该课程

主题相关的课程