Reputation: 27816
We have two git repos:
Example:
How to avoid this?
In the package "world" you can define dependencies. For example with rpm/dpkg/pip/npm. In above frontend/backend scenario you would need to define a dependency, too:
Frontend v0.5 needs backend v1.1.
Upvotes: 2
Views: 1472
Reputation: 10947
If you want to achieve full CI/CD then contract testing and/or functional testing are an absolute must.
Whether the system follows a more strict design by contract, what is clear is that the is a contract between parts, a mutual agreement on how the subsystems communicate, for example, what are the API responses from the backend that your fronted requires.
If one consumer requires, for example, a new schema for one specific API, or if one producer is updating the schema of one specific API, as you are describing, things will crash. That's why the contracts have to be validated every time that any of the subsystems are updated.
First, you need to think about your development workflow.
You need to have in place any tool for any of API testing, functional testing, contract testing. Very normal ones, that have given me a lot of peace of mind, are REST-Assured, and Runscope (that now belongs to Blazemeter, so you can leverage API monitoring, functional testing, and many other features). Also, I didn't use them, but you can look into pact.io and pactflow.io, and some people seem to have good results doing consumer-driven contract testing with Postman and in general continuous API testing with Postman with the help of newman
And finally, implement the testing in your CICD. Depending on what is your workflow, and your tools available, you will need to
Upvotes: 2