Your Postman collection passes every time you click "Send." Then you wire it into CI, and it fails on a machine that's n
Here's what actually breaks: Postman collections carry state. A login request stashes a token in an environment variable, the next request reads it, and it all works because Postman kept that variable alive between click
Here's what actually breaks: Postman collections carry state. A login request stashes a token in an environment variable, the next request reads it, and it all works because Postman kept that variable alive between clicks in your workspace. Move that same collection into a CI runner and there's no persistent workspace, each run starts cold. Newman will execute the requests, but if request #4 depends on a token that request #1 was supposed to set, and your export didn't capture how that token gets set (versus just its last cached value), you get an auth failure that has nothing to do with your API.
The usual fix is to hand-patch it: export the collection, write a Newman wrapper script, mock the auth step, manually thread state between requests. That works, but now you're maintaining two things, your OpenAPI spec and a parallel Newman config that drifts from it the moment someone adds an endpoint and forgets to update both.
The alternative is to stop exporting from Postman at all and generate the test suite from the OpenAPI spec itself. The spec already declares required auth, request/response shapes, and status codes, enough to generate tests that are stateless by construction, because each test authenticates and asserts against the contract instead of relying on a variable some earlier request happened to set. Point it at pytest, Jest, or Newman depending on what your CI already runs, and when the spec changes, regenerating the suite is the sync step, not a manual diff between two systems that were never guaranteed to agree.
That's what I built with apitestgen: https://apitestgen.dev/?utm_source=devto&utm_medium=social&utm_campaign=post?utm_source=devto&utm_medium=social&utm_campaign=itfabers-apitestgen, feed it your OpenAPI spec, get a runnable test suite that doesn't assume a human's browser tab is still open.
I'm working on this solo and it's pre-revenue, no client roster, no case studies to point to yet. I built this because the Postman-to-CI gap is one I hit myself setting up my own pipelines, and it seemed too common a wall to keep solving by hand. If you try it and it breaks on your spec, tell me, that's the feedback I actually need right now.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.