wiremock-unused-stubs-extension

Wiremock API extension to find stub mappigns that haven't matched a rquest

Лицензия

Лицензия

The Apache Software License, Version 2.0
Категории

Категории

Wire Данные Data Structures
Группа

Группа

com.github.masonm
Идентификатор

Идентификатор

wiremock-unused-stubs-extension
Последняя версия

Последняя версия

0.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

wiremock-unused-stubs-extension
Wiremock API extension to find stub mappigns that haven't matched a rquest
Ссылка на сайт

Ссылка на сайт

https://github.com/MasonM/wiremock-unused-stubs-extension
Система контроля версий

Система контроля версий

https://github.com/MasonM/wiremock-unused-stubs-extension

Скачать wiremock-unused-stubs-extension

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.masonm/wiremock-unused-stubs-extension/ -->
<dependency>
    <groupId>com.github.masonm</groupId>
    <artifactId>wiremock-unused-stubs-extension</artifactId>
    <version>0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.masonm/wiremock-unused-stubs-extension/
implementation 'com.github.masonm:wiremock-unused-stubs-extension:0.3'
// https://jarcasting.com/artifacts/com.github.masonm/wiremock-unused-stubs-extension/
implementation ("com.github.masonm:wiremock-unused-stubs-extension:0.3")
'com.github.masonm:wiremock-unused-stubs-extension:jar:0.3'
<dependency org="com.github.masonm" name="wiremock-unused-stubs-extension" rev="0.3">
  <artifact name="wiremock-unused-stubs-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.masonm', module='wiremock-unused-stubs-extension', version='0.3')
)
libraryDependencies += "com.github.masonm" % "wiremock-unused-stubs-extension" % "0.3"
[com.github.masonm/wiremock-unused-stubs-extension "0.3"]

Зависимости

test (9)

Идентификатор библиотеки Тип Версия
com.github.tomakehurst : wiremock jar 2.14.0
junit : junit jar 4.12
org.hamcrest : hamcrest-all jar 1.3
org.jmock : jmock jar 2.5.1
org.jmock : jmock-junit4 jar 2.5.1
org.skyscreamer : jsonassert jar 1.2.3
com.toomuchcoding.jsonassert : jsonassert jar 0.4.7
org.apache.httpcomponents : httpmime jar 4.5
com.github.tomakehurst : wiremock jar 2.14.0

Модули Проекта

Данный проект не имеет модулей.

Overview

Build Status Maven Central

wiremock-unused-stubs-extension is an admin extension for WireMock that adds a new endpoint, /__admin/unused_mappings, for finding and removing stub mappings that have not matched any requests in the journal. This is useful in conjunction with Record and Playback for pruning generated stub mappings.

Building

Run gradle jar to build the JAR without dependencies or gradle fatJar to build a standalone JAR. These will be placed in build/libs/.

Running

Standalone server:

java -jar build/libs/wiremock-unused-stubs-extension-0.3-standalone.jar

With WireMock standalone JAR:

wget -nc http://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-standalone/2.14.0/wiremock-standalone-2.14.0.jar
java \
        -cp wiremock-standalone-2.14.0.jar:build/libs/wiremock-unused-stubs-extension-0.3.jar \
        com.github.tomakehurst.wiremock.standalone.WireMockServerRunner \
        --extensions="com.github.masonm.wiremock.UnusedStubsAdminExtension"

Programmatically in Java:

new WireMockServer(wireMockConfig()
    .extensions("com.github.masonm.wiremock.UnusedStubsAdminExtension"))

Usage

  • Call GET /__admin/unused_mappings to retrieve an array of stub mappings that have not matched any requests in the request journal.
  • Call DELETE /__admin/unused_mappings to remove all such stub mappings. By default, any body files used by the stub mappings (typically stored in the "__files" directory) will preserved. To remove those too, pass "remove_files" in the query, i.e. DELETE /__admin/unused_mappings?remove_files

Версии библиотеки

Версия
0.3
0.2
0.1a