[Wire Mock] I want to set up a stub / mock server in Java and perform E2E tests.

I can't use the linked system in the verification system, but I want to do an E2E test

Since the world is in the age of microservices, it seems that the demand for mock stubs for HTTP request and response is increasing. The project I'm involved in has nothing to do with microservices, I was looking for an API server that runs on Java for the purpose as the title suggests.

WireMock HTTP-based API simulator, mock server. http://wiremock.org/ https://github.com/tomakehurst/wiremock

You can check the comparison with other API Servers at the following site Comparison of API simulation tools

Selected as TECHNOLOGY RADAR by ThoughtWorks in 2018 by TRIAL

https://www.thoughtworks.com/radar/tools/wiremock By the way, TRIAL seems to be an index that is worth doing if it is managed properly.

How to Use

A quick look There are the following two ways

Use in source code

Introduced in Maven and Gradle. It seems that there are many examples of using this in combination with JUNIT. Download and Installation

Install as a StandAlone server

Download the Jar file from the official website and start it Running as a Standalone Process

This time, I want it to work as an E2E test simulator, so I will use it as a StandAlone server. Does this format seem to reduce what you can do? We will investigate whether we can achieve what we want to do.

Reference site

WireMock server installation procedure

Recommended Posts

[Wire Mock] I want to set up a stub / mock server in Java and perform E2E tests.
I want to use PowerMock in a class that combines parameterized tests and ordinary tests
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
[Java] I want to perform distinct with the key in the object
How to test a private method in Java and partially mock that method
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (PowerMockito edition)
I want to create a dark web SNS with Jakarta EE 8 with Java 11
I want to ForEach an array with a Lambda expression in Java
Set up a Java GUI in a separate thread to keep the main
I want to send an email in Java.
I wanted to make (a == 1 && a == 2 && a == 3) true in Java
rsync4j --I want to touch rsync in Java.
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (black magic edition)
Let's create a TODO application in Java 2 I want to create a template with Spring Initializr and make a Hello world
I want to do something like "cls" in Java
[Android / Java] Set up a button to return to Fragment
I want to use a little icon in Rails
I tried to create a Clova skill in Java
[Android Studio] I want to set restrictions on the values registered in EditText [Java]
I tried to make a login function in Java
I tried using Log4j2 on a Java EE server
Steps to set up a VNC server on CentOS 8.3
I made a Restful server and client in Spring.
I want to define a function in Rails Console
What I learned when building a server in Java
I want to transition screens with kotlin and java!
How to convert A to a and a to A using AND and OR in Java
I want to click a GoogleMap pin in RSpec
I want to find the MD5 checksum of a file in Java and get the result as a string in hexadecimal notation.
In Java, I want to trim multiple specified characters from only the beginning and end.
I want to Flash Attribute in Spring even if I set a reverse proxy! (do not do)
I tried to modernize a Java EE application with OpenShift.
I want to bring Tomcat to the server and start the application
[Beginner] I made a program to sell cakes in Java
I want to perform high-speed prime factorization in Ruby (ABC177E)
I want to call a method and count the number
I just wanted to make a Reactive Property in Java
I tried to convert a string to a LocalDate type in Java
I want to create a Parquet file even in Ruby
How to develop and register a Sota app in Java
I tried to make a client of RESAS-API in Java
I want to implement various functions with kotlin and java!
How to set up a proxy with authentication in Feign
I want to simplify the conditional if-else statement in Java
Mock and stub in RSpec
If you want to mock a method in RSpec, you should use the allow method for mock and the singleton method.
I want to return to the previous screen with kotlin and java!
[Ruby] I want to put an array in a variable. I want to convert to an array
I want to perform asynchronous processing and periodic execution with Rail !!!
I created a PDF in Java.
[Ubuntu] Set up a Nukkit server
I want to docker-compose up Next.js!
The story of forgetting to close a file in Java and failing
I want to display images with REST Controller of Java and Spring!
I want to select multiple items with a custom layout in Dialog
(Limited to Java 7 or later) I want you to compare objects in Objects.equals
I want to display a PDF in Chinese (Korean) with thin reports
I want to get the IP address when connecting to Wi-Fi in Java
I wrote a Lambda function in Java and deployed it with SAM
I tried to make a talk application in Java using AI "A3RT"
[Java Spring MVC] I want to use DI in my own class