Skip to content

anuragashok/wiremock-extension-record-delay

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

wiremock-extension-record-delay

Set of wiremock extensions to record response time as delay during recording / snapshotting.

For the background behind the library and how it works , refer to this blog post https://theoverengineered.blog/posts/capture-response-time-in-wiremock-recordings

How to use

Import the library

<dependency>
    <groupId>com.github.anuragashok</groupId>
    <artifactId>wiremock-extension-record-delay</artifactId>
    <version>1.0.8</version>
</dependency>

Register extensions with wiremock

Use any of the following

options().extensions(RecordDelay.getExtensionClassNames());
options().extensions(RecordDelay.getExtensionClasses());
options().extensions(RecordDelay.getExtensions());

Enable extensions for specific stubs.

All the extensions are non-global and should be enabled only for the recording/snapshotting stubs that forward the request to a real backend. Example:

wm.stubFor(post(urlMatching("/abc")).atPriority(1)
        .willReturn(aResponse().withTransformers(RecordDelay.getExtensionClassNames()).proxiedFrom("https://www.xyz.com"))))

About

Set of wiremock extensions to record response time as delay during recording / snapshotting.

Resources

License

Stars

Watchers

Forks

Languages