V2EX  ›  英汉词典
Enqueued related words: Teardown

Test Fixture

释义 Definition

test fixture测试夹具 / 测试环境(常指预先准备好的固定条件)。在软件测试中,指为测试而建立的已知状态准备数据/对象/配置(例如数据库种子数据、模拟对象、初始化脚本),用来保证测试可重复、结果可比较。在硬件/制造业中也可指用于固定工件、便于测试或加工的夹具/工装。(该短语还有其他更细分用法,以上为最常见义项。)

发音 Pronunciation (IPA)

/ˈtɛst ˌfɪkstʃər/

例句 Examples

The test fixture loads sample data before each test.
测试夹具会在每个测试前加载示例数据。

To reduce flaky tests, we moved network calls behind mocks and rebuilt the test fixture so every run starts from the same database state and configuration.
为减少不稳定(偶发失败)的测试,我们用模拟对象隔离网络调用,并重建测试夹具,使每次运行都从相同的数据库状态与配置开始。

词源 Etymology

test 源自拉丁语 testum(“陶罐/容器”,引申为“检验”之意)并经法语进入英语;fixture 来自 fix(“固定”)+ 名词后缀 -ture,原指“被固定的装置”。合在一起,test fixture 字面是“用于测试的固定装置/固定条件”,后来在软件工程语境中引申为“为测试预先固定好的环境与数据”。

相关词 Related Words

文学与著作出现 Literary Works

  • xUnit Test Patterns: Refactoring Test Code(Gerard Meszaros)
  • Test-Driven Development: By Example(Kent Beck)
  • Growing Object-Oriented Software, Guided by Tests(Steve Freeman & Nat Pryce)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1971 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 13:46 · PVG 21:46 · LAX 05:46 · JFK 08:46
♥ Do have faith in what you're doing.