Answer the question
In order to leave comments, you need to log in
How to properly test microservice interactions?
There is a ready-made service A, which should use the not yet implemented functionality of service B.
-
- How can / should the functionality of B be simulated? My answer: using the nok library (what else?)
-
Answer the question
In order to leave comments, you need to log in
All this is done with the help of stubs, which instead of the implementation give plausible data, just hardcoded. Services, be they even SOA, even microservices, they should not be tied to ports at all. A service is a facade that closes the implementation of server logic from the outside world; when it starts, the service takes the port, host, access addresses to other services, and any other parameters from the settings. In order to start several services on one machine, simulate a server environment, several servers, you can use docker containers or virtual machines. From different ports, services can be combined into one bundle using nginx or another reverse proxy with URL rewriting. Or there is an option to use an application server, which hides from the developer the task of launching and combining services into one bundle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question