What are approaches to test custom clients for public web services?
Today there are many online services which provide an API. There is a boom of little apps using those APIs. Examples: desktop/mobile clients for social networks and blogging platforms, document storage and processing centers, cloud databases, real-time data streams, GIS data etc.
The problem is that often the non-trivial part in such applications is communicating with the online service (handling errors, encoding/decoding data, dealing with quotas, adjusting to API updates etc.), but developers of the client do not control the service. So one cannot see directly what effects of the tests are, and one cannot always rollback the state of the service back to the original.
- how do you design your client tests to be reproducible?
- what behaviors do you test?
- how do you test destructive or heavy-load behaviors? (against a public service)
- do you run such tests automatically (e.g. as a pre-commit hook)?
- how do you test against extraordinary situations (from service is down to exceeding quota, to inconsistent state, to sudden change of service behavior)?