In enterprise systems, especially those that are a little distributed, a common argument against unit testing is that "in real life, most bugs occur when apps communicate with each other".
I totally agree with you Maurício. The idea of isolating the problems in terms of testability excites me as it as a huge impact in the system architecture and design as well as on reducing or even remove the chances of critical bugs
Indeed, integration tests on distributed system is very complex and has a high cost. Is using mock in other external services is a good and valid solution for integration tests?
It sure is a way of doing it. I tend to rely on mocks a lot so that my test doesn't require a whole other software system up and running. The disadvantage is that you now need something smart to ensure that it the contract between the two systems change, you notice it, as your tests won't do that for you anymore. It's all about trade-offs!
I totally agree with you Maurício. The idea of isolating the problems in terms of testability excites me as it as a huge impact in the system architecture and design as well as on reducing or even remove the chances of critical bugs
Indeed, integration tests on distributed system is very complex and has a high cost. Is using mock in other external services is a good and valid solution for integration tests?
It sure is a way of doing it. I tend to rely on mocks a lot so that my test doesn't require a whole other software system up and running. The disadvantage is that you now need something smart to ensure that it the contract between the two systems change, you notice it, as your tests won't do that for you anymore. It's all about trade-offs!