Mocking is risky due to the fact that it does not capture a realistic environment.

That is why you should use real dev versions of services for:

  • Better production alignment. Your tests reflect real-world conditions, including API changes, security updates, and unexpected behavior.
  • Lower maintenance. Real services stay consistent with production, eliminating the need for constant mock updates and reducing technical debt.
  • Accurate testing. Complex workflows like authentication, payments, or multi-step integrations behave correctly, uncovering edge cases early.
  • Developer confidence. With realistic tests, you ship features knowing they’ll perform reliably in production.

Source: Why Mocking Sucks