mercredi 22 avril 2015

Mocking framework vs functional testing, why bother mocking?

I understand with mocking frameworks we can override behavior of objects. Which makes test easier and faster. Simulating objects behaviors in a production environment can be good. But then the question arises is mocking not simply for the developer ? at the end the functional test (which are real world test) show us what passed or failed. So why prolong the envitable ? Why bother mocking an object only to find out its not even working in production. Why wait for the functional tester to find out that codes not working. If we did not mock but instead used real test then we could find the bugs right away instead of pleasing ourselves with mocking. This was an argument presented to me and it might be philosphical but what are your thoughts on mocking framework vs real world unit testing

Aucun commentaire:

Enregistrer un commentaire