A Stub Matching on JSON Path That Fires on the Wrong Request
Quick answer Over-specific body matching is a quiet source of false positives in a mock. A stub that matches on a JSON path expression, or on a long list of
Read articleTopic
Quick answer Over-specific body matching is a quiet source of false positives in a mock. A stub that matches on a JSON path expression, or on a long list of
Read articleQuick answer When a mock server runs in a container or a compose stack, it should expose a health and readiness check just like a real service, and the check
Read articleQuick answer An HTTP client that follows redirects automatically can carry your credentials to a host you never intended to trust. When a 302 or 307 points at a different
Read articleQuick answer During a long API test run, an access token captured at the start will expire partway through, and a suite that re-authenticates for every single request wastes calls
Read articleQuick answer API changes belong in a pull request where the diff is the review artifact. When requests and responses live in a plain spec file, a change to a
Read articleQuick answer When an API defines more than one security scheme, the client has to choose correctly, and a wrong choice fails in confusing ways. A service that accepts a
Read articleQuick answer An assertion that compares an entire API response to a fixed literal is testing for exact equality, and it is brittle by design. When the server adds a
Read articleQuick answer When you mock a file upload endpoint, do not return a single canned success for every request. The real server branches on the payload: a small upload returns
Read articleQuick answer A 412 Precondition Failed is not a generic server error. It means the client sent a conditional header such as If-Match or If-Unmodified-Since, and the resource no longer
Read articleQuick answer WireMock's verify() confirms that a request matching a pattern actually reached the mock, and it is the natural way to assert your code called the right
Read articleQuick answer Running a mock inside Docker Compose gives every developer and the CI pipeline the same mock on a predictable address, with no local install or version drift. A
Read articleQuick answer Mutual TLS lets the server authenticate the client with a certificate instead of a bearer token, and it is notoriously awkward to configure in a GUI client. The
Read article