V2EX  ›  英汉词典

Test-Driven Development

定义 Definition

测试驱动开发:一种软件开发方法,先编写能描述需求的自动化测试(通常先让测试失败),再编写最少的代码使测试通过,并持续重构代码以改进设计与可维护性。常与“红-绿-重构(Red-Green-Refactor)”循环相关。(也常简称 TDD。)

发音 Pronunciation (IPA)

/ˈtɛst ˌdrɪvən dɪˈvɛləpmənt/

例句 Examples

I use test-driven development to catch bugs early.
我用测试驱动开发来尽早发现错误。

With test-driven development, the team wrote failing tests first, implemented the feature in small steps, and refactored safely after each green run.
采用测试驱动开发时,团队先写失败的测试,再用小步迭代实现功能,并在每次测试变绿后安全地重构。

词源 Etymology

该短语由 test-driven(由测试驱动的) + development(开发) 组成,强调“测试先行、用测试推动设计与实现”。在敏捷开发实践兴起的背景下广泛传播,尤其与 Kent Beck 在极限编程(XP)中的推广密切相关。

相关词 Related Words

文学与著作中的使用 Literary Works

  • Test-Driven Development: By Example(Kent Beck)——以实例系统阐述 TDD 的核心流程与思维方式。
  • Growing Object-Oriented Software, Guided by Tests(Steve Freeman, Nat Pryce)——强调以测试“引导”面向对象设计。
  • Clean Code(Robert C. Martin)——在代码整洁与工程实践讨论中频繁提及测试与 TDD 的价值。
  • Refactoring: Improving the Design of Existing Code(Martin Fowler)——与 TDD 常搭配使用,强调在测试保护下重构。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1076 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 17:05 · PVG 01:05 · LAX 09:05 · JFK 12:05
♥ Do have faith in what you're doing.