API regression tests
With our conversion to Wire complete, how do we make sure our service still works as we expect?
Our only immediate option is to just run the app and try it. This option might be OK for right now, but I don't like it as a long-term option, so let's see if we can add some automated tests.
The first question we should be asking ourselves is what are we testing? We should not need to test Wire itself, we can trust the tool authors to do that. In what other ways can things go wrong?
A typical answer would be our use of Wire. If we had misconfigured Wire, it would have failed to generate, so that is covered. That leaves us with the app itself.
To test the app, we need to run it and then make an HTTP call into it, and then validate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access