Also...

http://www.amazon.com/xUnit-Test-Patterns-Refactoring-Addison-Wesley/dp/0131495054

Is very helpful for learning how to handle common test smells..


On Sun, Aug 2, 2009 at 10:07 PM, Shane Courtrille <[email protected]
> wrote:

> Actually I'd agree with your manager.  A "Unit Test" does not touch
> anything external.  Everything should be mocked out when "unit" testing.
>
> BUT...
>
> Unit testing is only 1/2 the battle (and I now strongly believe the less
> important half of the battle).  Integration testing where you connect all
> your little pieces together and have them work end to end (including
> databases and web service calls) is critical to the safety and security of a
> software development project.  When done properly unit tests come and go as
> the individual units are refactored and sometimes even replaced but it is
> the integration (regression, smoke, whatever) tests that survive and prove
> that the entire system still continues to operate.
>
> On Sun, Aug 2, 2009 at 2:43 PM, Tom Whittaker <[email protected]> wrote:
>
>>
>> I have a development manager who wants us to mock almost every single
>> component our software change interacts with because he insists that
>> we are suppose to completely isolate our unit test from other
>> components, which is what he calls a unit test.
>>
>> We keep telling him that is not how to write unit tests, but he is the
>> manager, and so we've been doing it this way.
>>
>> For example, I agree with the following web page's "Reasons for use"
>> of mocks.
>>
>> http://en.wikipedia.org/wiki/Mock_object
>>
>> Does anyone have the argument that supports the extreme position our
>> manager is taking?  Or better yet, a good book or paper that argues
>> against this extreme?
>>
>> From what I've been seeing, it has created poorer quality software
>> because we are actually not finding bugs that use our real databases
>> and external web services until very late in the process.  We just had
>> a feature freeze date, and we found a few major problems that day
>> largely because everyone was using mocks, and the mocked systems did
>> not behave the way our mocks did, and the higher level functional
>> tests created by QA missed a few things that a normal unit test would
>> of caught had we not been using mocks for everything.
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to