Developers should consider using #FakeObjects instead of #MockObjects!
Fake objects offer similar isolation benefits while driving high confidence, clear documentation & loose coupling between implementation and test code.
#InfoQ article by Tyson Gern: http://bit.ly/3mfL9Wc
#fakeobjects #mockobjects #infoq #UnitTesting #softwaretesting #devops
You can use #TestDoubles (#mockobjects) without using a library/framework just the same as you can use #DependencyInjection without a container.
You don't need to feel stuck, even though I can guess how to reached the point of believing you were.
#testdoubles #mockobjects #dependencyinjection
Many #SwiftLang mock objects won't work well for ongoing maintenance. 🏗️ Here are 6 ways to improve them. #MockObjects https://qualitycoding.org/swift-mock-objects/
Further to my recent discussion about #TestDoubles/ #MockObjects in design, I remember asking this question at a SoCraTes event in Rochegude, France:
"Are method/function expectations an #OOP disease?"
(Or something similar.)
The short answer seemed to be this: it's quite OO, but maybe not a disease. In FP we sometimes contort ourselves to turn complicated custom workflows into straightforward function composition, and it's not always worth the effort.
#testdoubles #mockobjects #oop #lightweight #EvolutionaryDesign #tdd
Further to this idea, whose videos on "evolutionary design without #TestDoubles / #MockObjects" would you endorse? I mean you really like them. You found them compelling and convincing. They don't have to be free.
#testdoubles #mockobjects #lightweight #EvolutionaryDesign #tdd
@jbrains I would attend. I'm still a fan of using #MockObjects. My experience has been that the people who follow the "London" testing style (Nat Pryce and others) tend to like using them, while the people who follow the "Chicago" testing style (Sandi Metz, David Bernstein, and others) tend to not like using them.
I'm mulling hosting an open discussion about the widespread antipathy towards #TestDoubles ("#MockObjects"), because I'd like to understand more about why others have this and I don't.
I'm worried about doing this, because people can act in a way that I prefer not to experience, especially when we try to discuss such issues.
I'm curious about three things:
- Would you attend this?
- Would you watch a recording of this after the fact?
- How would you handle the "bad behavior" issue?