lundi 9 septembre 2019

What's an appropriate way to setup consumer driven contract testing for django api and react clients?

I just learned a new term called consumer driven contract testing.

I was thinking maybe it can help me solve my problem with writing tests for a django api provider and react frontend architecture project.

The frontend and the Django API backend are in separate repos and have their own unit tests.

However, once in a while there will be error because the frontend is assuming some fields that are not returned by the Django service backend.

I initially thought about writing end to end test, but they are slow to run and highly brittle.

I found this consumer driven contract testing and it sounds like the right thing. But when i google around, i cannot find anything suitable. Even Pact seems to be solely for just converting the contract to consumer tests.

What's a suitably easy way to have consumer driven contract testing for this scenario?

Aucun commentaire:

Enregistrer un commentaire