perfana-events-wiremock

Works with perfana-java-client maven plugins to generate wiremock events during load tests. For instance to reset wiremock instances or to increase delay times dynamically.

License

License

Categories

Categories

Wire Data Data Structures
GroupId

GroupId

nl.stokpop
ArtifactId

ArtifactId

perfana-events-wiremock
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

perfana-events-wiremock
Works with perfana-java-client maven plugins to generate wiremock events during load tests. For instance to reset wiremock instances or to increase delay times dynamically.
Project URL

Project URL

https://www.stokpop.nl
Source Code Management

Source Code Management

https://github.com/stokpop/perfana-events-wiremock

Download perfana-events-wiremock

How to add to project

<!-- https://jarcasting.com/artifacts/nl.stokpop/perfana-events-wiremock/ -->
<dependency>
    <groupId>nl.stokpop</groupId>
    <artifactId>perfana-events-wiremock</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/nl.stokpop/perfana-events-wiremock/
implementation 'nl.stokpop:perfana-events-wiremock:0.0.1'
// https://jarcasting.com/artifacts/nl.stokpop/perfana-events-wiremock/
implementation ("nl.stokpop:perfana-events-wiremock:0.0.1")
'nl.stokpop:perfana-events-wiremock:jar:0.0.1'
<dependency org="nl.stokpop" name="perfana-events-wiremock" rev="0.0.1">
  <artifact name="perfana-events-wiremock" type="jar" />
</dependency>
@Grapes(
@Grab(group='nl.stokpop', module='perfana-events-wiremock', version='0.0.1')
)
libraryDependencies += "nl.stokpop" % "perfana-events-wiremock" % "0.0.1"
[nl.stokpop/perfana-events-wiremock "0.0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
io.perfana : perfana-java-client jar 1.3.1
org.apache.httpcomponents : httpclient jar 4.5.6
org.apache.httpcomponents : httpmime jar 4.5.6

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
com.github.tomakehurst : wiremock jar 2.21.0

Project Modules

There are no modules declared in this project.

test-events-wiremock

Events to load and change wiremock stubs during load tests.

Properties:

  • wiremockFilesDir the directory where to find the wiremock files
  • wiremockUrl the wiremock urls, comma separated
  • useProxy on port 8888, for example to use with fiddler

Custom events:

  • wiremock-change-delay use to change delay of wiremock instances at specific time

Example wiremock response with a dynamic delay:

{
  "request": {
    "method": "GET",
    "url": "/delay"
  },
  "response": {
    "status": 200,
    "body": "Hello world! from Wiremock, with delay :-)",
    "fixedDelayMilliseconds": ${delay},
    "headers": {
      "Content-Type": "text/plain"
    }
  }
}

Put this in a file at in the files dir and it gets uploaded with the specific delay.

Define the delays in a eventSchedulerScript, example in use with events-gatling-maven-plugin:

<eventSchedulerScript>
    PT0S|wiremock-change-delay|delay=400
    PT30S|wiremock-change-delay|delay=4000
    PT1M30S|wiremock-change-delay|delay=8000
</eventSchedulerScript>

This means: set delay to 400 milliseconds at the start of the Gatling load test. Then increase the response time to 4000 milliseconds after 30 seconds. And increase response tim to 8000 milliseconds after 1 minute and 30 seconds.

Works with the Stokpop event-scheduler framework:

Versions

Version
0.0.1