Wiremock Gradle plugin

Ultra-lightweight, super-simple WireMock Gradle Plugin

License

License

NONE
Categories

Categories

Gradle Build Tools Wire Data Data Structures
GroupId

GroupId

com.github.william-hill-online
ArtifactId

ArtifactId

wiremock-gradle-plugin
Last Version

Last Version

0.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

Wiremock Gradle plugin
Ultra-lightweight, super-simple WireMock Gradle Plugin
Project URL

Project URL

https://github.com/William-Hill-Online/wiremock-gradle-plugin
Source Code Management

Source Code Management

https://github.com/William-Hill-Online/wiremock-gradle-plugin

Download wiremock-gradle-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.william-hill-online/wiremock-gradle-plugin/ -->
<dependency>
    <groupId>com.github.william-hill-online</groupId>
    <artifactId>wiremock-gradle-plugin</artifactId>
    <version>0.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.william-hill-online/wiremock-gradle-plugin/
implementation 'com.github.william-hill-online:wiremock-gradle-plugin:0.4.1'
// https://jarcasting.com/artifacts/com.github.william-hill-online/wiremock-gradle-plugin/
implementation ("com.github.william-hill-online:wiremock-gradle-plugin:0.4.1")
'com.github.william-hill-online:wiremock-gradle-plugin:jar:0.4.1'
<dependency org="com.github.william-hill-online" name="wiremock-gradle-plugin" rev="0.4.1">
  <artifact name="wiremock-gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.william-hill-online', module='wiremock-gradle-plugin', version='0.4.1')
)
libraryDependencies += "com.github.william-hill-online" % "wiremock-gradle-plugin" % "0.4.1"
[com.github.william-hill-online/wiremock-gradle-plugin "0.4.1"]

Dependencies

compile (1)

Group / Artifact Type Version
com.github.tomakehurst : wiremock jar 2.6.0

test (1)

Group / Artifact Type Version
org.spockframework : spock-core jar 1.1-groovy-2.4

Project Modules

There are no modules declared in this project.

Maven Central

Gradle Wiremock Plugin

Ultra-lightweight, super-simple WireMock Maven Plugin. It is based on the WireMock.

Plugin is available on the Gradle Plugin Portal.

Gradle will copy your resources from src/main/resources/ (or the specified one) to target/classes/. WireMock Gradle Plugin will start WireMock on localhost:8081 before the desired task run and use your mock definitions. When task process execution finishes, WireMock will be stopped as well.

Usage

Enable the plugin in your gradle build:

plugins {
  id 'com.williamhill.wiremock' version '0.4.1'
}

You can now declare a dependency on a running WireMock instance from any of your tasks:

task integrationTest(type: Test) {
    runWithWiremock = true
}

Add your mock definitions to the following folders:

src/main/resources/mappings/
src/main/resources/__files/

Configuration

Configure your WireMock instance inside a wiremock block:

wiremock {
    dir "src/test/resources/mappings/"
    params "--port=8081"
}

The wireMock configuration block can be declared at either the project or the task level. Task-level configuration inherits from any project-level configuration provided.

See WireMock manual for detailed information on available command line options.

com.github.william-hill-online

William Hill Online

Versions

Version
0.4.1