| 摘要: |
| 基于形式化的构件语义定义了健壮性,并提出一种基于状态机的构件健壮性测试方法.基于该方法实现
了原型工具RoTesCo.首先遍历状态机生成一组覆盖所有转换的路径,基于这些路径的测试用例驱动构件发生状态
转换;然后用无效输入和不当调用在构件的不同状态来测试其健壮性.通过区分测试中捕获异常的类别,自动报告健
壮性错误.以通用的开源项目构件组成评测平台,实验数据显示,RoTesCo 的测试效率比已有的算法表现得更优越. |
| 关键词: 软件测试 构件 健壮性 状态机 无效输入 |
| DOI: |
| 分类号: |
| 基金项目:Supported by the National Natural Science Foundation of China under Grant Nos.90818022, 60603036, 60721002 (国家自然科学基
金); the National High-Tech Research and Development Plan of China under Grant No.2007AA010302 (国家高技术研究发展计划
(863)); the Jiangsu Provincial Natural Science Foundation of China under Grant No.BK2007139 (江苏省自然科学基金) |
|
| Robustness Testing for Components Based on State Machine Model |
|
LEI Bin,WANG Lin-Zhang,BU Lei,LI Xuan-Dong
|
| Abstract: |
| This paper defines robustness based on a formal semantics of component system, and proposes a testing
framework to detect robustness problems. The approach is implemented in a tool named RoTesCo (robustness
testing for components). It traverses the state machine of the component under testing to generate paths, which
cover all the transitions. Firstly, the call sequences following the paths drive the component to different states.
Secondly, it feeds method calls with invalid parameters or inopportune calls to the component. The test oracle is
automated by distinguishing different types of exceptions. RoTesCo is evaluated on a benchmark of real-world
components from widely-used open source projects and it has produced encouraging results. |
| Key words: software testing component robustness state machine invalid input |