Re: [extremeprogramming] The principle behind How Test-Driven Development Works

"Slava Imeshev via Groups.Io" <[email protected]> Fri, 29 Nov 2019 11:11:20 +0700
Newsgroups gmane.comp.programming.extreme-programming
Message-ID <[email protected]>
I totally agree. TDD is hard if not impossible without designing to best practices. 

One design principle that seem to work consistently is Inversion of Control (IoC) aka Dependency Injection aka Programming to interfaces because one of its natural side effects is enabling use of mocks in unit tests. 

The second important component is knowledge and use of refactoring when dealing with a legacy code base because it enables making code testable. These days I just automatically launch a guided self study of refactoring for any member of the team who doesn’t have it. A fun and highly educational pair programming exercise is ‘making untestable testable’ when I take a class that a teammate declared untestable, refactor it and cover with unit tests under an hour. God bless Martin Fowler.

Regards,

Slava Imeshev


> On Nov 29, 2019, at 2:05 AM, Charlie Poole <[email protected]> wrote:
> 
> Most folks I know who are experts at TDD consider that design is part of it. Some have even said "It might be called Test Driven Design." However, traditionally, it isn't called that. My personal view is that "Development" includes Design, so calling it TestDrivenDevelopment is most appropriate. Those who prefer "Design" appear to think that Development simply means programming, which is not what the word means for me. A further problem with "Test Driven Design" is that many folks still think of design as something that happens before development, rather than as part of it.
> 
> I've seen that some people use ATDD for testing at the story level, others call it TDD. I prefer separate names but they both have design elements as part of the "development."
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#160361): https://groups.io/g/extremeprogramming/message/160361
Mute This Topic: https://groups.io/mt/39414677/2417047
Group Owner: [email protected]
Unsubscribe: https://groups.io/g/extremeprogramming/leave/4902963/619838065/xyzzy  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-