loading...

re: Consumer-Driven Contract Testing with Pact VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In the first code snippet, neither the interaction (I supposed that should have been successfulLogin) or UserService variables are defined. I'm won...
 

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?

Code of Conduct Report abuse