Skip to content

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

License

Notifications You must be signed in to change notification settings

celcius112/wiremock-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wiremock-extension

codecov

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.

Disclaimer

This extension is in an early alpha state. API might change at any time.

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.1.2</version>
</dependency>

Step 3. Annotate test classes by @ExtendsWith(MockitoExtension.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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%