kendarorg / HttpAnsweringMachine

Mixing trafficparrot, mitm proxy and pact.io, without using all of them. Real mocks, Recording, Inspections, PACT and NULL infrastructure at once
MIT License
31 stars 3 forks source link
api-simulation contract-testing dns-hijacking docker hijacking httprecording httpreplay https-hijacking httpsrecording java jdbc mitm mongodb null-infrastructure pact-tests proxy rest reverse-proxy ssl swagger

Motivation

How to test interdependent applications when you have no control over them.

A mocking library could work, but they are intrusive and with specific configuration that interposes itself into the whole development chain.

Testing over the wire is difficult too, outages on dev environment and not preventable errors can arise.

The AnsweringMachine is built to overcome this troubles

If you like it Buy me a coffe :)

paypal

New!!

Coming Soon

At glance

Ready-to-run examples

Features

Docker for development

Docker For CI

History

This project was born as a way to intercept http/s calls through a PHP application with apache, dnsmasq and openvpn on docker. To avoid changing all application configurations to debug against real environments. Then i added an oidc server, and looking at other products like Traffic Parrot or Hoverfly.io, the recording replaying was inserted as feature. To speed up stuffs it was then ported to Spring Boot and was added a true UI.

Conventions

Notice that all configuration values are in fact -paths- inside the external.json file. For example "global.logging.request.basic=true" means the following

[
  {
    "id": "global",
    ...
    "logging": {
      "request": {
        "basic": true
...

In case of arrays "ssl.domains[1].address=local.test" means the following

[
  {
    "id": "ssl",
    ...
    "domains": [
      {
        ...
      },
      {
        ....
        "address": "local.test"

Configurations

Basic functions

Plugins

Utils

Examples