
图4 表2中的一个测试用例
Again, all the other Causes and Effects in the table are dealt with as appropriate. Eventually, not more than n+1 columns, there’s at least one “1” and at least one “0” for each Cause. But there may still be untriggered Effects, for which additional columns may have to be created. So, the tester will then have a minimum set of test requirements, such that each column specifically targets one, and only one, potential bug location in the system. Now tester can consider whether to expand the set with additional tests to explore some otherwise untouched combinations.
像这样处理表中所有其他的原因和结果。最后,不会多于n+1个列,最少每个原因要对应一个“1”或者一个“0”。但是这样依然会有未触发的结果,需要为它们创建新的列。所以,测试者需要为测试需求构建一个最小集,好让每列都与系统中潜在BUG的位置一一对应。然后,测试者再考虑是否要用新的测试来扩展该集合以开发某些不同的未涉及到的因果组合。
This technique is also known as Test Requirements Definition technique (as are Control Flow graphing, State Transition Analysis, etc.), rather than test design. At the end of the process, each column expresses the requirements for a potential test case with a specific objective identified by the Cause(s) and Effect(s). The tester still has to design the actual test data values so that each supports the objective. The tester must also take special care with masked Causes, which must still be “1” or “0”, and design a test or tests to best execute the test cases. Due to restriction of paper length there isn’t scope to tell more, or to discuss topics such as subsidiary tables (for handling complicated input validation or output generation), iterations, and feedback loops.
因果法又被称为测试需求定义方法(控制流图,状态转换分析等等),而并非测试设计。在操作步骤结尾,每列都通过由原因和结果确定的目标为潜在的测试用例描述了需求。测试者依然需要设计实际的测试数据来支持这些目标。同时,他们还必须十分注意那些依然可以是“1”或“0”的被掩盖的原因,并设计一些测试来执行测试用例。由于文章篇幅所限,这里就不再讨论辅助表(用来处理复杂的输入或者输出)、迭代和反馈环等技术了。
4. Results
4. 结果
The benefits that have been achieved using this test case design technique on a pilot feature #1171 of OMC-R Agent are:
在OMC-R Agent的首要特性1171中用到的测试用例设计方法取得了如下效果:
Helps to achieve a better test coverage of the testing. A chived “six sigma” quality for the Feature #1171 on which this CE technique has been piloted. There is no post-release defects have been found for this feature. Please refer to the Q-data (Figure 6), and there are few reported defects. But none of them are from Feature# 1171.
得到了更好的测试覆盖率。通过在1171特性中的因果法的应用,到达了“6σ”的质量品质,使得该特性不存在后发缺陷。请参考图6中的Q数据,其中只有很少缺陷被报告,但没有一个存在于1171特性中。
Optimization in developing test cases (i.e., it is easy to avoid any duplication of test cases in a CE table by identifying the “masking” precedece as explained in Section 3.).
测试用例的优化。(例如,根据经过掩盖优先处理过的因果图设计的测试用例很容易避免测试用例的重复)
Easily understandable matrix format of test cases by reviewers/inspectors and quality assurance professionals.
复查/审核人员及质量保证专家更容易理解矩阵形式的测试用例。
Helps gain a deeper understanding of the requirements.
对需求有更深刻的理解。
Helps to identify ambiguous requirements and to improve on requirement specifications.
更好的确定不明确的需求并且改进需求说明书
Ease of traceability to requirements.
容易对需求进行跟踪

图5 表3中的测试用例
5. Conclusion
5. 结论
Software should be tested against what it is specified to do, not against what it actually observed to do. Software can be tested at various stages of the development cycle and with various degrees of rigor.
软件需要被测试它被指定做的事情,而不是实际上看到的做的事情。软件能够基于各种不同严格程度在开发周期的不同阶段被测试。
In practice, using CE technique, the design of each level of system testing has been developed through a number of layers, each adding more detail to the tests. This technique in some cases will also help clear the ambiguity in requirements while extracting the “Causes” and “Effects” from requirements for the matrix.
实际上,通过因果法,每一层次的系统测试设计可以若干级来开发,每一级增加新的测试内容。这种方法在一些情况下还能帮助理清不明确的需求,因为它从需求中把抽取“原因”与“结果”的放置到矩阵中。
During the review/inspection of the system test cases, the matrix can also be used to trace the requirement/ specification of the product to the test cases.
在系统测试用例的复查/审核过程中,矩阵还能用来检查产品的需求说明书与测试用例的一致性。
The effectiveness of testing effort can be maximized by using CE technique together with appropriate use of automated test execution tools such as Script Execution Test Tool (SETT) and TestExpert.
测试工作的效率可以通过因果法配合合适的自动化测试工具,例如脚本执行测试工具(Script Execution Test Tool,SETT)和TestExpert,得到最大化。
The net result of the CE technique will be an increase in quality and a decrease in costs, both of which can be beneficial to ABC’s software development cycle. This will help ABC to meet quality
使用因果法带来的结果将提升产品质量并降低成本,这对于ABC软件开发周期是很有益的。它能帮助ABC提升产品质量。

6. 词汇表
CE: Cause-Effect
CLI: Command Line Interface
CMIP: Common Management Information Protocol
CTM: CMIP Test Manager
GSD: Geographical Status Display
ITU: International Telecommunication Union
MIB: Management Information Base
MIT: Management Information Tree
OMC-R: Operational and Maintenance Centre-Radio
scevmgr: SuperCell Event Manager
SDC: System Data Collection
SETT: Script Execution Test Tool
SGI: Silicon Graphics Inc.
SSC: Singapore Software Centre
SST: Sub-System Testing
UNO: Universal Network Operations
7. 参考资料
[1] Krish T. Krishnakumar and Ng Orr Thiak, UNO2.1/ R8.1 OMC-R Agent Features:#1171, GSD and Status Display Software System Test Plan , SCELL-COM-OMC-SSTP-004, Version 2.0.0, May 20, 1998.
[2] Dan Lewis, Debbie Stackis, Ron Weddige, Ravishankar H.S, Huei-Ying Ong, Supercell OMC-R CMIP Agent Software Functional Specification, SCELL-COM-GEN-SFS-004, Version 11.2, May 30, 1998.
[3] IPL, Eveleigh House, Grove Street, Bath, BA1 5LR, UK, An Introduction to Software Testing, http:// www.teleport.com/~qcs/papers/p820.htm.
[4] IPL, Eveleigh House, Grove Street, Bath, BA1 5LR, UK, Software Testing and Software Development Lifecycles,
http://www.teleport.com/~qcs/papers/ p821.htm.
[5] "Weak Mutation Testing and Completeness of Test Sets", IEEE Trans. Software Eng., Vol.SE-8, No.4, July 1982, pp.371-379.