Great practical advice for doing TDD, helping demistify what TDD looks like. Thank you for sharing this knowledge for free! ❤
@PaulSebastianM10 ай бұрын
"TDD is not for adding tests to existing production code", but existing production code can be rewritten to be refactored into TDD as long as you do it for the entirety of a module (or system), never half of it because TDD is not for adding lipstick on a pig.
@marna_li10 ай бұрын
I agree on Integration Tests. It is testing the integration of/between services/resources in a system/sub-system. You don't have to involve a real database or real services if that is not relevant to the integration. Parts of it can still be mocked or substituted. To me, testing an entire service with real database is just an end-to-end test. Even if it is automated.
@marna_li10 ай бұрын
I believe that the misconception that you have to have a setup that is close to the production environment for integration tests, comes from the days before having containers. That was when you typically thought about testing your dev/QA instance. Since it was hard to replicate such an environment on your own machine. Now computing power is cheap, and you can run it on any machine.
@hyunbinpark33827 ай бұрын
Agree on most of your statement, but he also mentioned that end-to-end test is part of the integration test. Imo, integration tests can have mocking, but also can have physical database depending on the needs.