V2EX  ›  英汉词典
Enqueued related words: Integration Test, Regression Test, TDD, Test Suite

Unit Test

释义 Definition

(软件工程)单元测试:对程序中最小可测试单元(如函数、方法、类)进行的自动化测试,用于验证该单元在各种输入下的行为是否符合预期。(也可泛指对“单元/组件”的独立测试;在实际语境中最常见的是软件测试。)

发音 Pronunciation (IPA)

/ˈjuːnɪt tɛst/

例句 Examples

I wrote a unit test for this function.
我为这个函数写了一个单元测试。

Before merging the code, the team required that every critical module have unit tests covering edge cases and error handling.
在合并代码之前,团队要求每个关键模块都有覆盖边界情况和错误处理的单元测试。

词源 Etymology

“unit test”由 unit(单元) + test(测试) 组成,字面意思是“对单个单元进行测试”。该术语在现代软件工程中广泛使用,尤其与自动化测试实践相关;随后在 xUnit 家族框架的推动下(常与 Kent Beck 等人的实践相关)进一步普及,并常与 TDD(测试驱动开发)一起出现。

相关词 Related Words

文学与著作中的用例 Literary Works

  • Test-Driven Development: By Example(Kent Beck)
  • Clean Code: A Handbook of Agile Software Craftsmanship(Robert C. Martin)
  • The Pragmatic Programmer(Andrew Hunt & David Thomas)
  • xUnit Test Patterns: Refactoring Test Code(Gerard Meszaros)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2360 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 13:54 · PVG 21:54 · LAX 05:54 · JFK 08:54
♥ Do have faith in what you're doing.