65 / 65 · 14 API Testing Fundamentals · API Versioning← prev⊞ all☰ Read as one page
8.8Key Takeaways
- Always test backward compatibility: v1 must not break when v2 launches
- Test cross-version data access: data created in one version should be readable in another
- Test default version behavior: what happens when no version is specified?
- Monitor deprecated endpoints: they must work until the announced sunset date
- URL path versioning is most common; header versioning is cleanest but harder to test manually
- Version compatibility testing prevents one of the most impactful types of API bugs
Interview Talking Point: "I build API test suites in pytest with the requests library, organized around authentication, CRUD operations, error handling, and edge cases like rate limiting and pagination. I test both success paths and failure modes — expired tokens, malformed payloads, information leakage in error responses. I parameterize environments so the same suite runs against dev, staging, and production with a single variable change."