How to detect API modifications when mocking e2e tests? : <p>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 :</p>

<p><strong>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 ?</strong></p>

<p>Your tests would still pass because they're testing an outdated version of the model but the app is potentially broken.</p>

<p>For example, if a mock assumes that <code>/api/users/1</code> returns <code>null</code> 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.</p>

<p>Or maybe the backend is somehow providing static json files with the latest up-to-date model and the frontend relies on this ?</p>

<p>This of course supposes that the people working on the backend and the people working on the frontend are separate teams.</p>

<p>I am using Angular 1.x and Protractor here but this doesn't really depend on the technology.</p>
