# 探究：软件工程中的test oracle到底是什么意思？

## 2. 探究过程

### 2.1 在百度学术上以“test oracle”为关键字进行搜索

1）Xie T. Augmenting Automatically Generated Unit-Test Suites with Regression Oracle Checking[J]. 2006, 4067:380-403.

2）Tu D, Chen R, Du Z, et al. A Method of Log File Analysis for Test Oracle[C]// International Conference on Scalable Computing and Communications; Eighth International Conference on Embedded Computing, 2009. Scalcom-Embeddedcom. IEEE, 2009:351-354.

A test case consists of two parts: a test input to exercise the program under test and a test oracle to check the correctness of the test execution. A test oracle is often in the form of executable assertions such as in the JUnit testing framework. Manually generated test cases are valuable in exposing program faults in the current program version or regression faults in future program versions.

[6]还补充了oracle的概念和构成：

An oracle is a mechanism for determining whether the program has passed or failed a test.

A complete oracle would have three capabilities and would carry them out perfectly:

1）A generator, to provide predicted or expected results for each test.
2）A comparator, to compare predicted and obtained results.
3）An evaluator, to determine whether the comparison results are sufficiently close to be a pass.

wiki百科[7]也有相关定义。

### 2.2 查找test oracle中文表述

test oracle的中文表述是：测试预言
（之前好像也有老师讲过这个术语，但是我记不清 了）

## 参考文献

[1] 软件测试中的test oracle指什么？ https://www.zhihu.com/question/30250441

[2] Xie T. Augmenting Automatically Generated Unit-Test Suites with Regression Oracle Checking[J]. 2006, 4067:380-403.

[3] Tu D, Chen R, Du Z, et al. A Method of Log File Analysis for Test Oracle[C]// International Conference on Scalable Computing and Communications; Eighth International Conference on Embedded Computing, 2009. Scalcom-Embeddedcom. IEEE, 2009:351-354.

[4] junit 方法：assertEquals 和 assertTrue. https://blog.csdn.net/expect521/article/details/77747964

[5] What is a test oracle, and what is it used for? https://stackoverflow.com/questions/23522166/what-is-a-test-oracle-and-what-is-it-used-for

[6] A Course in Black Box Software Testing-Examples of Test Oracles. http://www.testingeducation.org/k04/OracleExamples.htm

[7] Test oracle. https://en.wikipedia.org/wiki/Test_oracle

08-09 2万+
07-02 2万+
09-23 1459
03-18
03-24 10万+
10-31 8万+
06-23 1万+
01-31 3707
11-15 57
07-10 9万+
04-15 237
10-30 1000
08-05 8944