It depends...
It depends on whether it's a single class \ method that does a single thing, such as calculations or validations, or you need to validate a process \ workflow.
I think integration testing is to validate that the overall behaviour of an aspect of your code works as you think it should; thus an integration of classes, packages and libraries.
I think it's better to use as much real code as possible and rely as little as possible on mocks.
Love your explanation. I feel the same way about testing. I much rather prefer not to mock at all. Unless you rely on an environmental dependency that HAS to be mocked.
It depends...
It depends on whether it's a single class \ method that does a single thing, such as calculations or validations, or you need to validate a process \ workflow.
I think integration testing is to validate that the overall behaviour of an aspect of your code works as you think it should; thus an integration of classes, packages and libraries.
I think it's better to use as much real code as possible and rely as little as possible on mocks.
Love your explanation. I feel the same way about testing. I much rather prefer not to mock at all. Unless you rely on an environmental dependency that HAS to be mocked.
Thanks!
Mocking stuff can be a real pain and takes a lot of time to work out if everything needed for the test is available (mocked).
Lol! Takes more work sometimes to do that than to just run it fully integrated.