In the first code snippet, neither the interaction (I supposed that should have been successfulLogin) or UserService variables are defined. I'm wondering how does the pact Interaction instance interface with the UserService exactly since they don't appear connected?
My professional interests are cloud and big data technologies, machine learning, and software development. I like to read source code and research papers to understand how stuff works.
Pronoun: He
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?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In the first code snippet, neither the
interaction
(I supposed that should have beensuccessfulLogin
) orUserService
variables are defined. I'm wondering how does the pactInteraction
instance interface with theUserService
exactly since they don't appear connected?Thx! I corrected it.
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?