Use BeanValidation annotations in your response POJOs to specify non-exact matches, i.e. @Past Instant lastChange.
This generates a new file in the bar response-constraints.properties with <json-pointer>: <constraints>, e.g. /product/lastChange: Past. The runner accepts responses that match this constraint. If there is no constraint, the response must match the exact value.
Generating fixed data increases the coupling and is impossible if the API provider creates its own data (e.g. ids); so the demo API consumer generates random but matching test data. System Tests can also generate random but matching test data to reduce conflicts with other tests and brittle or impossible cleanup code. There will be some generator support in the lib.
Use BeanValidation annotations in your response POJOs to specify non-exact matches, i.e.
@Past Instant lastChange.This generates a new file in the bar
response-constraints.propertieswith<json-pointer>: <constraints>, e.g./product/lastChange: Past. The runner accepts responses that match this constraint. If there is no constraint, the response must match the exact value.Generating fixed data increases the coupling and is impossible if the API provider creates its own data (e.g. ids); so the demo API consumer generates random but matching test data. System Tests can also generate random but matching test data to reduce conflicts with other tests and brittle or impossible cleanup code. There will be some generator support in the lib.