Pact does not have any awareness of data flows. This is both a strength and a weakness. It's a weakness because in real life, request/response pairs often occur in common sequences. However, it is a strength because when tests depend on data from previous test, they become brittle.
I'd recommend using the type based matching on the provider side so that you don't have to specify exactly what the data is in a certain resource, you just specify the types. This will make the tests less brittle, and mean that the provider team doesn't have to make every value exactly as you wrote in your test. Yes, you have to specify a concrete URL at some stage (/things/1234), because you can't replay a request with a regular expression in it.
Here is the wiki page on regular expression and type based matching: https://github.com/realestate-com-au/pact/wiki/Regular-expressions-and-type-matching-with-Pact
--
You received this message because you are subscribed to the Google Groups "Pact" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pact-support...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.