pedro
08/23/2022, 9:15 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
pedro
08/24/2022, 2:26 AMThe point of provider verification isn’t to make Pact tests pass, but to ensure your provider actually worksExactly! and thank you for replying. After saying the approach should be (1.) got me thinking what’s the point of having hard-coded responses? What if the schema changes and developers fail to update the hard-coded responses? Then will you please explain what’s the use of state handlers (provider states)? Do the state handlers query the db for the data that was seeded just for the tests? How do we link a state handler for say ‘state 1’ with the query that returns the values in the db for ‘state 1’?
Matt (pactflow.io / pact-js / pact-go)
pedro
08/24/2022, 4:50 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
given
in your TDD tests, just at an API testing level. The given represents some arbitrary, abstract state. How you get into that state is up to your provider (implementation detail)pedro
08/24/2022, 1:58 PM