I've been building a lot of API and web app testing automation and wrote an article to share what I've learned.
To sum up some bigger points:
- use as little end-to-end tests as possible
- when end-to-end tests uncover bugs, write new unit tests
- dilligently remove flaky tests and tests that don't provide value
- keep test data consistent, short-lived, and as small as possible
Would love to discuss problems anyone else has encountered testing APIs and web services.
(note: I am a co-founder @ Assertible)