Back to articles
NewsTools

How I built an API coverage comparison tool (Swagger vs Postman)

via Reddit Programming/u/InevitableSilver2476

I recently worked on a problem I kept facing during API testing — understanding actual coverage. We usually have: - OpenAPI / Swagger specs (expected endpoints) - Postman collections (what we actually test) But there’s no simple way to compare the two and see what's missing. So I built a small tool that does this comparison. Here’s the technical approach I used: Parsing OpenAPI / Swagger - Extracted all endpoints (method + path) - Normalized dynamic params like /users/{id} Parsing Postman collections - Traversed nested folders and requests - Converted URLs into comparable endpoint formats Matching logic - Built a comparison layer: • matched endpoints • missing endpoints (in spec but not tested) • extra endpoints (in Postman but not in spec) Challenges - Handling path params vs actual values (/users/123 vs /users/{id}) - Normalizing base URLs - Avoiding false positives in matching Output - Structured report with coverage metrics - Lists of matched/missing/extra endpoints I’m curious: Ho

Continue reading on Reddit Programming

Opens in a new tab

Read Full Article
4 views

Related Articles