question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WireMock with JUnit 5

See original GitHub issue

In JUnit 5, @Rule and @ClassRule is superseded by @ExtendWith, which requires extension class. And it seems like extension for WireMock is not yet supported. Is there any alternative way to use WireMock with stubbing and verification via JUnit 5?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:71
  • Comments:64 (2 by maintainers)

github_iconTop GitHub Comments

36reactions
luolongcommented, Apr 9, 2019

What about splitting Wiremock library in two – wiremock-core and wiremock-junit4 and adding wiremock-jupiter for JUnit 5 support?

The wiremock library could then simply have a dependency on core and junit4 for the sake of legacy users?

35reactions
tomakehurstcommented, Sep 3, 2019

I’m coming around to the idea of making both JUnit 4 and 5 optional/provided dependencies. I’m going to look at this (with the usual caveats about being busy and it not happening quickly).

Read more comments on GitHub >

github_iconTop Results From Across the Web

JUnit 5+ Jupiter - WireMock
The JUnit Jupiter extension simplifies running of one or more WireMock instances in a Jupiter test class. It supports two modes of operation...
Read more >
Testing Spring Boot Application using WireMock and JUnit 5
WireMock is a library for stubbing and mocking web services. It constructs an HTTP server that acts as an actual web service. In...
Read more >
Integration Tests with WireMock and JUnit 5 - LinkedIn
Overview As per WireMock, is a simulator for HTTP-based APIs. Some might consider it a Service Virtualization tool or a Mock Server.
Read more >
Spring Boot Integration Tests With WireMock and JUnit 5
This article showcases a testing recipe for writing integration tests for Spring Boot applications using WireMock and JUnit.
Read more >
WireMock JUnit 5 and Rest-Assured Example [UPDATED]
WireMock JUnit 5 and Rest-Assured tutorial consists of a small demo about Wiremock and JUnit 5. We can create mocks and stubs with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found