Weitere Kapitel dieses Buchs durch Wischen aufrufen
While both acceptance-test-driven development (ATDD) and test-driven development (TDD) are methodologies that advocate writing the tests before the code, ATDD (or BDD) is usually considered to lend itself better to bigger test scopes and to scenarios that describe how the users use the system, while TDD is considered to lend itself more specifically to unit tests, which uses the smallest test scope (of a single class or even a method), and therefore tests more technical details. For that reason, unit tests and TDD are considered practices that are done directly by the same developer that implements the code under test (CUT). While toward the end of this chapter we’ll question the distinction between TDD and ATDD, we first need to understand more about unit tests and TDD in general.
Bitte loggen Sie sich ein, um Zugang zu diesem Inhalt zu erhalten
Sie möchten Zugang zu diesem Inhalt erhalten? Dann informieren Sie sich jetzt über unsere Produkte:
CUT can either mean “ code under test” or “ class under test.” I use this acronym interchangeably whenever the difference is not important or the meaning is clear from the context. Otherwise I’ll use the explicit term.
As Martin Fowler said about the JUnit framework: “Never in the field of software development was so much owed by so many to so few lines of code.”
Kent Beck, Test-Driven Development: By Example (Menlo Park, CA: Addison-Wesley, 2002).
Michael Feathers, Working Effectively with Legacy Code (Englewood Cliffs, NJ: Prentice Hall, 2004).
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software (Menlo Park, CA: Addison-Wesley Professional, 1994), p. 124.
In the Software-Engineering Radio podcast, episode 215, around minute 56 onward, the authors of the GOF book themselves discuss the problems with the Singleton pattern ( http://www.se-radio.net/2014/11/episode-215-gang-of-four-20-years-later/ ).
In his website, http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod , there are links to the major documents where these principles originally appeared.
Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts, Refactoring: Improving the Design of Existing Code (Menlo Park, CA: Addison-Wesley Professional, 1999).
- Unit Tests and TDD
- Chapter 17
Neuer Inhalt/© ITandMEDIA