What Test Engineers Do at Google: Building Test Infrastructure
Summary of the article: At google-scale, integration tests take too long because it triggers so many service calls.  So the solution is to use static hard-coded mock data.  But also create tests to verify the mock data with real service calls.  So previously, if you had N tests calling a rest service A, it would result in N calls to service A.  But now, those N tests go to a hardcoded mock data, and there is a single test verifying the mock data by calling A.  So N tests can run fast and there will be only a single call to A to verify the mock.However, that would be the best case, which is the mock data is sufficient for all N tests.  That is not likely to be true, but probably a M number of mocks can still cover all N tests.  And M < N in most cases so there's still savings in number of service calls.  In the worst case, N tests will need N mocks and it will be the same as before.