Mid-LevelAPI & Integration Testing
How do you test multipart requests and complex content types?
- multipart
- content types
- encoding
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Multipart testing: verify boundary parsing, mixed file + JSON payloads, character encoding in field names and values. Test edge cases: missing required parts, extra unexpected parts, very large parts, empty parts. Content-type testing: verify API rejects unsupported content types, handles charset correctly, responds with appropriate content type. Use tools that let you control raw request construction (curl, custom HTTP clients) for edge case testing.
What interviewers listen for
- Schema-first thinkingYou validate response shape before you assert on values, every time.
- Status-code literacyYou can defend why 401 vs 403 vs 422 matters for the consumer.
- Contract awarenessYou know when consumer-driven contract tests beat end-to-end checks.
- Auth fluencyYou can describe rotating tokens across parallel workers without secrets in logs.