Visit my latest wiki at wiki.pacroy.com
Test-driven Development is a programming practice that instructs developers to write new code only if an automated test has failed, and to eliminate duplication. The goal of TDD is clean code that works.
__Massol & Husted: JUnit in Action
Test Driven Development is the craft of producing automated tests for production code, and using that process to drive design and programming
For every bit of functionality, you first develop a test that specifies and validates what the code will do.
You then produce exactly as much code as necessary to pass the test. Then you refactor (simplify and clarify) both production code and test code
__Agile Aliance
Source: Brian Nielsen, Arne Skou. Test Driven Development. Retrieved May 30, 2017 from https://goo.gl/lfyX48
Source: Matt Chernosky. (2016, March 14). How to Write Better Unit Tests For Embedded Software With TDD. Retrieved from https://goo.gl/4Y6OtZ
Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle. It can be succinctly described by the following set of rules:
Adapted from Agile Alliance. TDD Glossary. Retreived May 30, 2017 from https://goo.gl/2EcEZz
You must begin by writing a unit test for the functionality that you intend to write.
But by rule 2, you can’t write very much of that unit test. As soon as the unit test code fails to compile, or fails an assertion, you must stop and write production code.
But by rule 3 you can only write the production code that makes the test compile or pass, and no more.
Source: Robert C. Martin (Uncle Bob). The Three Rules of TDD. Retrived May 30, 2017 from https://goo.gl/6Y2ir5
Test-driven development is related to, but different from acceptance test–driven development (ATDD).
TDD is primarily a developer’s tool to help create well-written unit of code (function, class, or module) that correctly performs a set of operations. ATDD is a communication tool between the customer, developer, and tester to ensure that the requirements are well-defined.
TDD requires test automation. ATDD does not, although automation helps with regression testing. Tests used in TDD can often be derived from ATDD tests, since the code units implement some portion of a requirement. ATDD tests should be readable by the customer. TDD tests do not need to be.
Source: Wikipedia
Source: Abhay Kumar - LinkedIn
BDD (behavior-driven development) combines practices from TDD and from ATDD. It includes the practice of writing tests first, but focuses on tests which describe behavior, rather than tests which test a unit of implementation. Tools such as Mspec and Specflow provide a syntax which allow non-programmers to define the behaviors which developers can then translate into automated tests.
Source: Wikipedia
See more books at Suggested Reading for Professional Scrum Developer