I'd like to setup a solid e2e testing foundation on our team's project but I can't find a simple solution to that question :
When you are mocking all of your calls, what is the best way to detect if the actual model of the objects returned by your server has been modified ?
Your tests would still pass because they're testing an outdated version of the model but the app is potentially broken.
For example, if a mock assumes that /api/users/1
returns null
if the user doesn't exist, when it actually returns an empty object, then although the tests may pass, the behaviour being tested relies on incorrect assumptions and may therefore fail in unexpected ways.
Or maybe the backend is somehow providing static json files with the latest up-to-date model and the frontend relies on this ?
This of course supposes that the people working on the backend and the people working on the frontend are separate teams.
I am using Angular 1.x and Protractor here but this doesn't really depend on the technology.