DEV Community

Discussion on: Consumer-Driven Contract Testing with Pact

Collapse
 
frosnerd profile image
Frank Rosner

I supposed that should have been successfulLogin) or UserService variables are defined

Thx! I corrected it.

I'm wondering how does the pact Interaction instance interface with the UserService exactly since they don't appear connected?

They don't interface directly. By registering the interaction with the provider, the stub server will respond accordingly if it receives a respective request. Invoking the user service will trigger an HTTP request towards the stub server. What is hidden here is that you need to configure the stub server (providerConfig) and the HTTP client, such that the client reaches the stub server.

Does it make sense?