The slides of my session "Front End & Back End in Sync with Pact CDC Tests" given at the Agile Test @Munich Meetup on 25.10.2018.
How can we test that the REST calls from the front end and their respective back end endpoints work correctly together? Of course browser tests against the deployed application cover that. But their feedback is very slow and finding the root cause for a test failure takes ages. Thus the Testing Pyramid suggests to complement those with more isolated tests.
In the last few years Consumer-Driven Contract (CDCs) Tests have become an elegant solution to keep a consumer and a provider service in sync in a decoupled fashion. So why not transfer this idea to the interactions between back end and front end? So we tried to use the Pact CDC library to assure our Angular front end and our Spring Boot back end do fit together. Nice by-product: the front end and back end tests are logically connected but can be executed isolated and decoupled from each other.
In the session I will explain the approach, show you the code of an example project and tell you about our experiences with it.
You can find a full example project in this github repository: https://github.com/davidvoelkel/angular-spring-boot-pact