TDD ~ Introduce

Source: Internet
Author: User

........................................ .............................. TDD

Test-driven development (TDD) is an important part of extreme programming (XP)-eXtreme Programming. Recently, jgtm 2004 was ecstatic about another important part of XP, Pair programming.

I have seen people mention "test-driven development" before, and I thought it was a test-driven development.ProgramSo I don't care. I read the connection of the sam111 post to understand what is going on. (Test-driven development, is it better to translate it into "test-led development ?)

The author of test driven development: by example is Kent Beck, one of the founders of the XP movement. His other classic book is eXtreme Programming explained: embrace change.

TDD aims to generate the clean code that works, in the words of Ron Jeffries, and uses automated testing to lead the development process. The common practice is:
1. The new Code is written only when the automated test fails.
2. Deduplication

In practice, the general development cycle is as follows,
1. Write a test (write test code)
2. Make it run (make it run, take any means, including hardcode and test-related values)
3. Make it right (to make it a good code, use refactoring-reconstruction method to eliminate repeated encoding)

This book is divided into three parts. In the first part (17 chapters in total), the author uses a multi-currency example to demonstrate the TDD process in a simple and clear way. Starting from the operations involved in the currency, first introduce the multinational currency from the simple inheritance law, then use the reconstruction method to repeatedly eliminate the repeated encoding, and finally return to a single class. The second part is about how to use the Python language to write a test architecture with TDD (a bit like mongoming brain surgery on yourself ). The third part summarizes the TDD development mode.

The general feeling is that this book is a rare entry-level teaching material for TDD, but it also feels that TDD interns need to be proficient in OOP and refactoring practices, otherwise, it is difficult to implement the TDD spirit from start to end.

There are two articles on msdn about TDDArticle:

1. Unit testing and test-first Development (Eric Gunnerson)
2. Get test infected with nunit: unit test your. NET data access layer (Steven A. Smith)

There is also a connection that contains rich resources:

. Net test driven development

Of course, don't forget the necessary test architecture for TDD development in. Net:

Nunit

And

Nunitaddin (http://weblogs.asp.net/nunitaddin)

(This post is referenced from: http://blog.joycode.com/saucer/archive/2004/02/25/13794.aspx)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.