How to Build Contract-Driven API Tests With OpenAPI and AI

https://hackernoon.imgix.net/images/jSuQAPYhebVk6dkXIUEu05K23TH2-9g83bg4.png

Hi! I’m Oleg, a QA Engineering Manager focused on test strategy, automation, and AI-assisted QA workflows.

This is a continuation of a series on where AI actually earns its place in QA — and this time the answer starts somewhere less glamorous than AI: with the OpenAPI spec.

The short version: we generate a Java API client from Swagger, write tests against that generated client, measure coverage against the spec automatically in GitLab CI, and hand the resulting gaps to an LLM as a structured JSON report so it can write the missing tests.
The problem: tests that drift away from the contract
A very common failure mode in API testing is that tests live separately from the API contract.

A QA engineer assembles URLs by hand, writes JSON by hand, parses responses by hand. Swagger exists somewhere nearby — analysts and developers keep it updated, the tests nominally check...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more

https://cdn.mos.cms.futurecdn.net/U8FDQjAxYmygvFzXAoLXzK-1920-80.jpg

'The next generation won’t replace this one so much as sit on top of it' — Industry analysts say Sony, Microsoft, and Nintendo's 'relentless push for higher-end performance will need to be moderated' to avoid $1000 launch consoles

* Several industry analysts say Sony and Microsoft may need to scale back their "relentless push for higher-end performance" to avoid $1000 consoles * Piers Harding-Rolls at Ampere Analysis says ambitions will need to be "moderated" to avoid breaching the hefty price point * Rhys Elliott at Alinea Analytics