Wanted to get some input from folks who deal with this daily. My biggest headache with API testing right now is consistency across environments. A suite that passes in local dev will randomly fail in QA or staging, and half the time it comes down to environment-specific config, stale mocks, or auth differences rather than an actual bug in the API.
How are you all handling this? Specifically:
- Keeping one set of tests portable across local, QA, and staging
- Generating mocks that stay close to real production traffic
- Running everything in CI without it turning into a maintenance sink
- Spotting regressions early instead of during a staging deploy
While digging around I found a useful breakdown of api automation testing tools that walks through how various tools approach test generation and mocking, which gave me a few ideas.
Would love to hear what your team standardized on. Do you run the same tool end to end, or layer contract tests on top of integration checks? And how do you stop mock data from drifting over time?