A simulated HTTP server for testing client code with configurable responses.
Groovy CSS XSLT HTML Java Kotlin
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
gradle/wrapper
src
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
LICENSE.txt
README.md
ReleaseNotes.adoc
build.gradle
gradle.properties
gradlew
gradlew.bat
publish.gradle

README.md

Ersatz Server

Download Build Status Coverage Status Twitter Follow

Quick Links

Buy Me a Coffee at ko-fi.com

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.

Artifacts

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

For Gradle:

testCompile 'com.stehno.ersatz:ersatz:1.6.2'

For Maven:

<dependency>
    <groupId>com.stehno.ersatz</groupId>
    <artifactId>ersatz</artifactId>
    <version>1.6.2</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

Note: There are some long-running tests that may be skipped during local development using:

./gradle -Pskip-long-running clean build

License

Copyright (C) 2017 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.