Menu

A green CI job can still capture zero API requests
📰

A green CI job can still capture zero API requests

DEV Community: cicd·moath othman·1 day ago
#2Q8zCpc6
#devtocicd#devto#dev#test#exit
Long article (439 words) — no AI summary yet.
Reading 0:00
15s threshold

Drafted with AI assistance. The example uses synthetic test data.

A proxy-based API check has a blind spot: a test runner can exit successfully even if its requests never went through the proxy. A client might ignore proxy environment variables, or an entry in NO_PROXY might bypass the host under test. If zero observed failures counts as success, a broken test setup looks healthy.

Start with a positive control

Pick a harmless endpoint in a staging environment you control. Call it using the same HTTP client and configuration as the test suite. Verify that the expected method, host and path appear in the current capture. A successful curl command only tells you that curl is configured correctly.

Deliberately disable proxy routing for that client and check that your gate notices the missing traffic. Then restore routing and verify a known-good request.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.