Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 2.04 KB

README.md

File metadata and controls

40 lines (27 loc) · 2.04 KB

wiremock-extension

Build Status codecov Donate

The wiremock-extension is a JUnit 5 extension that starts WireMock before running tests and stops it afterwards. It is similar to the WireMockRule (docs) for JUnit 4.

Usage

Step 1. Add the JitPack repository to your pom.xml file

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the wiremock-extension dependency

<dependency>
    <groupId>com.github.JensPiegsa</groupId>
    <artifactId>wiremock-extension</artifactId>
    <version>0.4.0</version>
    <scope>test</scope>
</dependency>

Step 3. Annotate test classes by @ExtendWith(WireMockExtension.class)

  • see ExampleTest for further configuration and different use cases.

Contribute

Feedback is welcome. The source is available on Github. Please report any issues.

About

Plugin originally created by Jens Piegsa.