

Show HN: Mockingjay – Fake servers and consumer-driven contracts - quii
https://github.com/quii/mockingjay-server

======
quii
This is a project born of my frustration of making fake servers and CDCs over
and over again as we break our monolith into tiny pieces.

I figured the requirements for both fake servers and CDCs in a lot of cases
are the same. "Given a request, i want this response". So I thought, why not
just define it once in configuration and be done with it. This stops the two
things getting out of sync.

The wiki has lots of info as to how to use it and what the point of it is.
Would appreciate any feedback, apart from mean things.

~~~
fredkelly
Looks great, like an OS version of [http://apiary.io](http://apiary.io)

------
dekz
We use Pact[1], but the idea of flakeyness is interesting. Would you end up
with non deterministic builds with the flakeyness? I imagine you could get
enough 404's to trigger a Circuit Breaker in your application and this would
propagate to tests sometimes failing.

[1]: [https://github.com/realestate-com-
au/pact](https://github.com/realestate-com-au/pact)

~~~
quii
I do like the idea of Pact, I looked into it a few years ago. I guess what I
wanted for this was a zero(ish) amount of code solution.

I think Pact and MJ have different advantages over each other.

Pact gives you more options but I think MJ is simpler to use and gives you
options in terms of testing performance which is often neglected.

------
advanderveer
I've encountered the same frustration and created Dockpit
([https://dockpit.io](https://dockpit.io)) as a solution; it uses Docker
containers though.

------
volaski
A genuine question, how is it differentiated from Stubby?
[http://stub.by/](http://stub.by/)

~~~
quii
Ha, wow I had never seen this before and it is very similar.

I suppose the main difference is

\- As far as I can see, Stubby doesn't provide CDCs-like functionality and MJ
does. The idea of this is you can make sure your fake endpoints are valid. A
common problem with mocks is that they go out of sync with a real server so
your build is green, but it shouldn't be

\- No flaky functionality

\- Doesn't require any particular system dependencies (npm, maven or anything
like that)

