friendsofgo / killgrave

Simple way to generate mock servers written in Go
https://friendsofgo.github.io/killgrave/
MIT License
523 stars 100 forks source link

Acceptance testing framework #139

Closed joanlopez closed 1 week ago

joanlopez commented 1 year ago

TL;DR - It sets up a basic acceptance testing framework for Killgrave.

Here's some further information:

Requirements/assumptions

The main testing algorithm is:

So, it's pretty easy to define multiple acceptance/end-2-end tests for different imposters.


Once merged, I'd suggest to consider adding one extra test to this suite as part of the definition of done (DoD) for all the remaining PRs, and for the new ones, unless completely unrelated.

Also, in the near future, we could extend this kind of framework to also assert the Killgrave's output.


Thanks!


PS: I merged #173 because it was a requirement to have ✅ checks here, and the only suggestion I left unresolved was adding more coverage with tests, which is indirectly covered by the changes present here.