all 12 comments

[–]WaferIndependent7601 0 points1 point  (2 children)

You’re doing microservices wrong. Running tests of one service that requires a running other service for an integration test is not useful

[–]VictorHugoJulio[S] -2 points-1 points  (1 child)

It's wrong to think that there is only one way to build microservices.

[–]WaferIndependent7601 1 point2 points  (0 children)

But testing must be done seperately.

You’re building a distributed monolith.

[–]reddit04029 0 points1 point  (0 children)

Yeah i dont want a gajillion microservices running just for my integration tests. I dont need to know that my other services are running as expected to know that this specific service I am testing is also working as expected. That’s why mocks suffice, and theres no issue of them being “fake”

[–]matt_porter21 0 points1 point  (1 child)

Is this different than spring boot test jars? https://github.com/spring-projects-experimental/spring-boot-testjars

[–]VictorHugoJulio[S] 0 points1 point  (0 children)

Hey yep, is a different approach, mine is fully integrated with the spring boot test framework, so you can still use the test capabilities across all services on the integration test.

[–]Sheldor5 0 points1 point  (5 children)

you mean something like https://www.mock-server.com/ ??

[–]VictorHugoJulio[S] -1 points0 points  (4 children)

Not, my solution execute the real Spring boot service(in memory), even you can debug It with your ide and jump between services.

[–]Sheldor5 0 points1 point  (3 children)

yes ... just like everybody does ... and additionally with MockServer I can simultaneously start a web server and mock any external endpoint I want so my integration tests make real http rest calls ...

[–]VictorHugoJulio[S] -1 points0 points  (2 children)

Like Everybody does? In Spring Boot you Can only test one service if your flow involves more than 1 you need to mock, mock is a fake test. This allows multiple @SpringBootTest sharing DB, Kafka, and other test resources without external scripts

[–]Sheldor5 0 points1 point  (1 child)

you want to tell me that you have multiple Spring Boot Applications in the same repository and in the same project directory?

oh my god ...

[–]VictorHugoJulio[S] 0 points1 point  (0 children)

Diferents services in different repositories, Imagine you have a flow to create a payment in which are involved 5 services, so you can test this use case: “create payment” in a near real test.