Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.06 KB

File metadata and controls

35 lines (24 loc) · 1.06 KB

Mockserver Module

Mock Server can be used to mock HTTP services by matching requests against user-defined expectations.

Usage example

The following example shows how to start Mockserver.

Creating a MockServer container inside_block:creatingProxy

And how to set a simple expectation using the Java MockServerClient.

Setting a simple expectation inside_block:testSimpleExpectation

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

testCompile "org.testcontainers:mockserver:{{latest_version}}"
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>mockserver</artifactId>
    <version>{{latest_version}}</version>
    <scope>test</scope>
</dependency>