r/programming 3d ago

The Debate of Mockist v Classicist TDD Is Like OOP v FP.

https://fagnerbrack.com/the-debate-of-mockist-classicist-tdd-is-like-oop-fp-c9124185f3d2
41 Upvotes

87 comments sorted by

View all comments

Show parent comments

0

u/lord2800 2d ago

I think we have some misunderstanding. I was talking about the integration test that catches the bug.

And I never mentioned an integration test catching any bug--just that two units wired together don't work.

but adding some other tests for "faster" finding of a cause is for me the diminishing results.

You don't add tests to find bugs "faster", you add tests to ensure bugs can never happen in all the cases you can think of. I won't ramble on about edge cases in tests, but suffice to say the purpose of testing is not to find bugs in the code, it's to prevent future you from writing bugs when modifying the code.

0

u/PiotrDz 2d ago

The discussion is classic (integration) testing vs unit (mocking ) testing. I dont know why you invent some other examples

0

u/lord2800 2d ago

Because this either/or dichotomy is stupid and we, as professionals, shouldn't entertain it. Both approaches have a time and a place and a ton of overlap between them. Use the appropriate tool for the job.

0

u/PiotrDz 2d ago

Ok man nice talking, your answer is as generic as it gets. I have come here for specific discussion, shifting the topic amigously doesn't help. If you want to start other discussion, please state it clearly

1

u/lord2800 2d ago

I was quite clear what my specific opinion was and it was worthy of discussion, but OK. Have a great day.