ersatz

Mock server library for testing HTTP clients.

License

License

GroupId

GroupId

com.stehno.ersatz
ArtifactId

ArtifactId

ersatz
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

ersatz
Mock server library for testing HTTP clients.
Project URL

Project URL

http://stehno.com/ersatz
Source Code Management

Source Code Management

https://github.com/cjstehno/ersatz

Download ersatz

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
org.codehaus.groovy : groovy jar 2.5.8
org.codehaus.groovy : groovy-json jar 2.5.8
io.undertow : undertow-core jar 2.0.28.Final
javax.servlet : javax.servlet-api jar 3.1.0
org.hamcrest : hamcrest-library jar 2.2
org.awaitility : awaitility jar 4.0.1

runtime (6)

Group / Artifact Type Version
javax.activation : activation jar 1.1.1
ch.qos.logback : logback-classic jar 1.1.7
commons-fileupload : commons-fileupload jar 1.4
com.github.spotbugs : spotbugs-annotations jar 3.1.12
junit : junit jar 4.12
org.junit.jupiter : junit-jupiter-api jar 5.5.2

Project Modules

There are no modules declared in this project.

Ersatz Server

Download Build Status Coverage Status Twitter Follow

Quick Links

Introduction

The Ersatz Server is a HTTP client testing tool which allows for request/response expectations to be configured in a flexible manner. The expectations will respond in a configured manner to requests and allow testing with different responses and/or error conditions without having to write a lot of boiler-plate code.

Warning: v2.0 is NOT directly backwards compatible with the 1.x codebase. See the Migrating to 2.0 section of the User Guide for details.

Artifacts

Project artifacts are available via the JCenter (Bintray) and Maven Central repositories.

For Gradle:

testCompile 'com.stehno.ersatz:ersatz:2.0.0'

For Maven:

<dependency>
    <groupId>com.stehno.ersatz</groupId>
    <artifactId>ersatz</artifactId>
    <version>2.0.0</version>
    <scope>test</scope>
</dependency>

Alternately, there is a safe (shadowed) version of the library available, which is useful in cases where you already have a version of Undertow in use (to avoid version collisions). See the Shadow Jar section of the User Guide for more information.

Build Instructions

Ersatz is built using Gradle with no custom build tasks:

./gradlew clean build

License

Copyright (C) 2020 Christopher J. Stehno

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
2.0.0
1.9.0
1.8.1
1.8.0
1.7.0
1.6.2
1.6.1
1.6.0
1.5.0
1.4.0
1.3.0
1.2.1
1.2.0
1.1.0
1.0.0
0.6.0
0.5.0
0.4.3