--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
It seems to me that he's missing the idea of using mocks to design protocols/interfaces. Expecially reused protocols and interfaces.
--
Mandata dal telefonino.
--
"There’s a balance between exhaustively testing execution paths and testing integration. If we test at too large a grain, the combinatorial explosion of trying all the possible paths through the code will bring development to a halt. Worse, some of those paths, such as throwing obscure exceptions, will be impractical to test from that level. On the other hand, if we test at too fine a grain—just at the class level, for example—the testing will be easier but we’ll miss problems that arise from objects not working together."
@eraserhd Here @dhh talks about TDD failing us. He references TDD's "original" goals and intent - but names GOOS's! http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html@eraserhd An excellent example of why I'm talking about this at self.conference. We can't actually remember what TDD was. // @dhh
"The current fanatical TDD experience leads to a primary focus on the unit tests, because those are the tests capable of driving the code design (the original justification for test-first)."
@eraserhd Thinking about writing a blog post about mocks and how the _benefits they claim_ are simply a restatement of the problems they bring.
@garybernhardt Blogged: "Test Isolation Is About Avoiding Mocks" https://www.destroyallsoftware.com/blog/2014/test-isolation-is-about-avoiding-mocks@garybernhardt That post is the first time that I've ever managed to directly explain the design pressure of isolation in detail. It only took seven years.
@eraserhd There's at least two kinds of TDD. If you don't like TDD because it makes your code hard to change, *please* try the other kind.@eraserhd Curious about this idea that mocking, when done well, does not make refactoring more difficult. Can't imagine how. // @garybernhardt@eraserhd .@garybernhardt I've encountered codebases with mocks-not deeply nested- where I couldn't refactor safely. This is why I ask.@eraserhd .@garybernhardt Both safety and ease troubles, but I definitely see that the safety frustrations come equally from my own expectations.@eraserhd .@garybernhardt I mean, I *expect* safety from units, which isn't fair if it's not intended.
@garybernhardt May 16 Twitter dropped about thirty of my replies on the floor overnight.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
• Hard to test -> change tests
This is a form of using tests as verification.
• Hard to test -> change design
This is a form of using tests as design pressure."
"We’ve found that the qualities that make an object easy to test also make our code responsive to change.
The trick is to let our tests drive our design (that’s why it’s called test-driven development). TDD is about testing code, verifying its externally visible qualities such as functionality and performance. TDD is also about feedback on the code’s internal qualities: the coupling and cohesion of its classes, dependencies that are explicit or hidden, and effective information hiding—the qualities that keep the code maintainable.
With practice, we’ve become more sensitive to the rough edges in our tests, so we can use them for rapid feedback about the design. Now when we find a feature that’s difficult to test, we don’t just ask ourselves how to test it, but also why is it difficult to test."
"I can only remember three of the rules at any one time...the 3rd one is the one that I am going to forget this time, oh, yes, 'no duplication', the 3rd one is 'no duplication', in the logic of the code"
@philip_schwarz @eraserhd is listening to the tests http://www.mockobjects.com/2007/03/synaesthesia-listening-to-test-smells.html part of the design process of TDD? /cc @coreyhaines @jbrains @angelaharms
"Isolated testing has an easily identified villain: the deeply-nested mock object." Starts with a bogus strawman - nobody who uses mocks advocates deeply nested mocks.
On Sun, Oct 5, 2014 at 2:49 PM, Mike Stockdale <jedi...@syterra.com> wrote:"Isolated testing has an easily identified villain: the deeply-nested mock object." Starts with a bogus strawman - nobody who uses mocks advocates deeply nested mocks.On the contrary, nested mocks => indirection without abstraction. I guess we need to make this clearer.
--Free Your Mind to Do Great Work :: http://www.freeyourmind-dogreatwork.com
-----You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
"I just don't go very far down the mock path. I look at code where you have mock returning mocks returning mock and my experience is if I have, if I use TDD I can refactor stuff, and then I heard these stories, people say "well I use TDD and now I can't refactor anything" and like I could not understand that, and then I started looking at their tests and well, if you have mocks returning mocks returning mocks, your test is completely coupled to the implementation, not the interface, but the exact implementation of some object, you know, three streets away, of course you can't change anything without breaking the test. So that for me is too high a price to pay.That is not a trade off I am willing to make just to get piecemeal development"
"This post was triggered by Kent's comment about triply-nested mocks. I doubt that he intended to claim that mocking three levels deep is inherent to, or even common in, isolated testing. However, many others have proposed exactly that straw man argument. That argument misrepresents isolated testing to discredit it; it presents deep mocks, which are to be avoided in isolated testing, as being fundamental to it; it's fallacious. It's at the root of the claim that mocking inherently makes tests fragile and refactoring difficult. That's very true of deep mocks, but not very true of mock-based isolation done well, and certainly isn't true of isolation done without mocks."
THE 7 HABITS OF HIGHLY EFFECTIVE PEOPLEHABIT 5: SEEK FIRST TO UNDERSTAND, THEN TO BE UNDERSTOOD
28 Feb 2014 @eraserhd .@angelaharms @jbrains I see emergent design in Detroit coming from refactoring. In GOOS, from isolation tests being hard.
This whole discussion is fundamentally broken. Pointless strawman divisions.
There is more than one tool in the box.