Skip to content

[Feature]: Support non-Jupiter test engines #198

Description

@Saberos

Use Case / Motivation

During our Spring Boot 4 upgrade we migrated from Spring Cloud Contract WireMock to WireMock Spring Boot due to the removal of @AutoconfigureWireMock. We simply replaced the annotation everywhere with @EnableWireMock. However, we ran into an issue with our Cucumber tests. Due to those tests using the custom JUnit Cucumber engine instead of the JUnit Jupiter engine, the WireMockSpringJunitExtension is never loaded.

This was a bit confusing since it fails silently and only partially. The WireMock server is started correctly, since those are started through the Spring Test framework in WireMockContextCustomizer. Just the default WireMock client is never configured nor are the servers reset between tests, since that is handled by the extension.

Proposed Solution

Would it be an option to also provide (or migrate) the functionality of the extension using the Spring Test framework, for example a TestExecutionListener? I've build a hacky internal implementation now that somewhat reproduces the behaviour of the extension, but as it relies on internal WireMock Spring Boot functionality it is quite fragile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions