这里没有软件测试的泛泛理论,只有博主的最佳实践。 博主的研究方向为静态分析和性能测试,致力于各种测试工具的引入、评估和开发。 本博的测试文章均为作者原创,转载请务必注明出处。

What is "Test harness"?

上一篇 / 下一篇  2008-03-25 10:31:38 / 个人分类:IT英语

今天看一篇文章时,又看到了test harness,虽然我隐约知道其含义,但要翻译成中文写到纸面上,好像还真不知道怎么讲。重新找到以前看到test harness时的文档,如下

 这里的test harness意思是在做单元的动态测试时,需要将单元运行起来,就需要编写测试代码(驱动和桩),这里将编写的那些测试代码叫做test harness。这是那时候看到test harness的理解。

今天再次看到,情景如下

TestExecute Test harnesses are slightly different though, in that they require Test Servers.

如果还只是停留在以前的理解上,或者借助于金山词霸对harness的解释

harness:[ 'hɑ:nis ]

n. 马具,系在身上的绳子,甲胄
v. 束以马具,披上甲胄,利用产生动力

肯定还是无法准确翻译,于是还需要进一步深挖其含义,先google一下,得到如下信息。

下面是个人认为比较贴切的翻译(转至《软件测试自动化框架》):

test harness英文释义:
In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitor its behavīor and outputs. It has two main parts: the test execution engine and the test scrīpt repository.Test harnesses allow for the automation of tests. Think of it as scaffolding upon which you will build your tests.
A test harness should allow specific tests to run (this helps in optimising), orchestrate a runtime environment, and provide a capability to analyse results.

test harness中文释义:
在软件测试中,test harness或自动化测试框架是一个包含了软件和测试数据(这些数据已经过配置)的集合,用以测试一个程序单元,使之在不同的条件下运行,并监控它的行为和输出。Test harness有两个主要的组成部分:测试执行引擎和测试脚本储存库(repository)。因此,Test harness能够使我们实现自动化地测试。简单的说,你可以把test harness当作是你构建测试时所使用脚手架。
一个test harness应包括具体的测试运行(有利于优化),设计运行时环境,以及提供结果分析的能力。

(引用自http://www.51testing.com/?42751/action_viewspace_itemid_76843.html

What should a test harness include?

Test harnesses should include the following capabilities:

  • A standard way to specify setup (i.e., creating an artificial runtime environment) and cleanup.
  • A method for selecting individual tests to run, or all tests.
  • A means of analyzing output for expected (or unexpected) results.
  • A standardized form of failure reporting.

(引用自http://www.devdaily.com/java/junit/node9.shtml

test harness应该包含:首要条件是测试环境的搭建(如搭建虚拟的运行时环境)和清理,选择运行单个测试或者所有测试的方法,分析输出结果的手段以及错误的标准报告。

从以上的解释看出,test harness范围更大,不光是测试代码,还包含了测试的整个环境。所以具体到当前的难题来讲,可以翻译为“测试框架”。

个人体会,欢迎讨论!


TAG: IT英语

xjmen的个人空间 引用 删除 xjmen   /   2012-10-09 16:50:00
很有帮助的讨论,否则即被翻译软件误导,又会被很烂的翻译书误导,呵呵
xjmen的个人空间 引用 删除 xjmen   /   2012-10-09 16:49:03
3
引用 删除 jingghster   /   2009-12-15 12:50:02
From WIKI:
In software testing, a test harness or automated test framework is a collection of software and test data configured to test a program unit by running it under varying conditions and monitoring its behavior and outputs. It has two main parts: the Test execution engine and the Test script repository.

Test harnesses allow for the automation of tests. They can call functions with supplied parameters and print out and compare the results to the desired value. The test harness is a hook to the developed code, which can be tested using an automation framework.

A test harness should allow specific tests to run (this helps in optimising), orchestrate a runtime environment, and provide a capability to analyse results.

The typical objectives of a test harness are to:

Automate the testing process.
Execute test suites of test cases.
Generate associated test reports.
A test harness may provide some of the following benefits:

Increased productivity due to automation of the testing process.
Increased probability that regression testing will occur.
Increased quality of software components and application.
引用 删除 enjoytest   /   2009-07-20 17:32:01
公司里用到的test harness可以理解为测试工具,用来导入测试数据,执行测试并输出测试结果。
yangqiumei的个人空间 引用 删除 yangqiumei   /   2008-10-14 16:34:43
<<Effective Software Testing:50 specific ways to improve your testing>>中,可以理解为“公司内部一种自己开发的应用于测试程序内部逻辑的代码”
__网上摘抄
Make testing easy 引用 删除 zyawoo   /   2008-07-05 22:58:07
楼主,我google了一下,你的“test harness”已经排在我前面了。
5555555555555555555555555
huanlong的个人空间 引用 删除 huanlong   /   2008-05-30 09:46:11
5
感动啊  眼泪哗哗的   找了一天  我感觉是驱动的意思  但是感觉不准确  还好朋友  谢谢
huanlong的个人空间 引用 删除 huanlong   /   2008-05-30 09:45:47
感动啊  眼泪哗哗的   找了一天  我感觉是驱动的意思  但是感觉不准确  还好朋友  谢谢
 

评分:0

我来说两句

Open Toolbar