wiremock-stub-mapping-tracker

Wiremock extensions to track stub mapping usage

Лицензия

Лицензия

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

Категории

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

Группа

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

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

wiremock-stub-mapping-tracker
Последняя версия

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

0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

wiremock-stub-mapping-tracker
Wiremock extensions to track stub mapping usage
Ссылка на сайт

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

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

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

https://github.com/MasonM/wiremock-stub-mapping-tracker

Скачать wiremock-stub-mapping-tracker

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

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

Зависимости

test (6)

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

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

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

Overview

Build Status Maven Central

wiremock-stub-mapping-tracker is a set of WireMock extensions for tracking which stub mappings have been used in a request and easily deleting unmatched mappings. This is useful in conjunction with Record and Playback for pruning generated stub mappings. Tracking is done independently of the request journal.

Requires Java 1.8+

Building

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

Running

Standalone server:

java -jar build/libs/wiremock-stub-mapping-tracker-0.1-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-stub-mapping-tracker-0.1.jar \
        com.github.tomakehurst.wiremock.standalone.WireMockServerRunner \
        --extensions="com.github.masonm.StubMappingTrackerAdminExtension,com.github.masonm.StubMappingTrackerPostServeExtension"

Programmatically in Java:

new WireMockServer(wireMockConfig()
    .extensions("com.github.masonm.StubMappingTrackerAdminExtension", "com.github.masonm.StubMappingTrackerPostServeExtension"))

Usage

  • POST /__admin/mappings_tracker/reset - Clear journal of tracked stub mappings
  • GET /__admin/mappings_tracker/matched - Return all stub mappings that have matched a request
  • GET /__admin/mappings_tracker/unmatched - Return all stub mappings that haven't matched a request
  • DELETE /__admin/mappings_tracker/unmatched - Delete all stub mappings that haven't matched a request

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

Версия
0.1