All Projects → lanwen → wiremock-junit5

lanwen / wiremock-junit5

Licence: Apache-2.0 License
Wiremock extension to inject server into JUnit5 tests

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to wiremock-junit5

Wiremock
A tool for mocking HTTP services
Stars: ✭ 4,790 (+11039.53%)
Mutual labels:  mock-server, wiremock
wiremock
A tool for mocking HTTP services
Stars: ✭ 5,239 (+12083.72%)
Mutual labels:  mock-server, wiremock
testing-spring-boot-applications-masterclass
🍃 Everything You Need to Know About Testing Spring Boot Applications
Stars: ✭ 185 (+330.23%)
Mutual labels:  wiremock, junit5
qa-automation-base
There are basic projects for automation frameworks based on Kotlin/Java and TypeScript for the backend, frontend, and mobile.
Stars: ✭ 45 (+4.65%)
Mutual labels:  junit5
pytest-mock-server
Mock server plugin for pytest
Stars: ✭ 19 (-55.81%)
Mutual labels:  mock-server
archunit-junit5-kotlin
Generic Architecture Tests written in Kotlin using ArchUnit and Junit5
Stars: ✭ 22 (-48.84%)
Mutual labels:  junit5
mocka
Mocka — A Mock Server Made for Developers by Developers, made in Swift ❤️
Stars: ✭ 56 (+30.23%)
Mutual labels:  mock-server
open-api-mocker
A mock server based in OpenAPI Specification
Stars: ✭ 58 (+34.88%)
Mutual labels:  mock-server
jest-pact-typescript
A PACT consumer example written in TypeScript with Jest
Stars: ✭ 22 (-48.84%)
Mutual labels:  mock-server
gmocker
Create a blazing fast mock server with just a JSON file
Stars: ✭ 49 (+13.95%)
Mutual labels:  mock-server
mockify
Easy, configurable API mocking you can change on-the-fly
Stars: ✭ 83 (+93.02%)
Mutual labels:  mock-server
bdd
JUnit 5 based BDD library to create and run stories and behaviors a.k.a BDD specification tests
Stars: ✭ 25 (-41.86%)
Mutual labels:  junit5
hivemq-testcontainer
Automatic starting HiveMQ docker containers for JUnit4 and JUnit5 tests. This enables testing MQTT client applications and integration testing of custom HiveMQ extensions.
Stars: ✭ 17 (-60.47%)
Mutual labels:  junit5
mock-oauth2-server
A scriptable/customizable web server for testing HTTP clients using OAuth2/OpenID Connect or applications with a dependency to a running OAuth2 server (i.e. APIs requiring signed JWTs from a known issuer)
Stars: ✭ 83 (+93.02%)
Mutual labels:  junit5
jsxmock
使用 JSX 来定义 Mock Server
Stars: ✭ 31 (-27.91%)
Mutual labels:  mock-server
Mockaco
🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting
Stars: ✭ 213 (+395.35%)
Mutual labels:  mock-server
servirtium-java
Service Virtualized HTTP - to help service test automation stay fast and consistent
Stars: ✭ 16 (-62.79%)
Mutual labels:  mock-server
pactum
REST API Testing Tool for all levels in a Test Pyramid
Stars: ✭ 190 (+341.86%)
Mutual labels:  mock-server
any-mock
A configurable mock server,help you mock APIs.
Stars: ✭ 25 (-41.86%)
Mutual labels:  mock-server
wiremock-chrome-extension
A simple chrome extension for Wiremock
Stars: ✭ 19 (-55.81%)
Mutual labels:  wiremock

Wiremock JUnit5

codecov Maven Central

Simple extension to inject ready-to-use wiremock server to JUnit5 test

Start Guide

  1. Add dependency
ru.lanwen.wiremock:wiremock-junit5:${wiremock-junit5.version}
  1. Create JUnit5 test:
@ExtendWith({
        WiremockResolver.class,
        WiremockUriResolver.class
})
class WiremockJUnit5Test {

    @Test
    void shouldInjectWiremock(@Wiremock WireMockServer server, @WiremockUri String uri) {
        customize(server); // your setup
        SomeApiClient api = SomeApiClient.connect(uri);

        Response response = api.call();
        assertThat(response.headers(), hasSize(1));
    }
}

Reuse customization

With ru.lanwen.wiremock.config.WiremockCustomizer and ru.lanwen.wiremock.config.WiremockConfigFactory you can reuse logic of initial setup.

Please look into test for example.

Compatibility with JUnit5

  • v1.0.1 -> M4
  • v1.1.0 -> RC2
  • v1.1.1 -> GA
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].