• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊
论文

基于一致性测试理论的Statechart描述的测试用例自动生成

展开
  • (1.浙江师范大学行知学院,浙江 金华 321004;2.浙江师范大学数理与信息工程学院,浙江 金华 321004)
苗春雨(1978),男,吉林梨树人,硕士,讲师,研究方向为计算机软件理论。陈丽娜(1978),女,吉林舒兰人,硕士,讲师,研究方向为可信计算与信号处理。赵建民(1950),男,上海人,硕士,教授,CCF会员号(E200006748s),研究方向为模式识别与图像处理。

网络出版日期: 2011-05-01

Automatic Generation of Test Cases for Statechart Specification Based on the Conformance Testing Theory

Expand
  • (1.Xingzhi School,Zhejiang Normal University,Jinhua 321004;
    2.School of Mathematics,Physics and Information Engineering,
    Zhejiang Normal University,Jinhua 321004,China)

Online published: 2011-05-01

摘要

本文研究Statechart描述的测试语义和测试用例的自动生成。基于Tretmans的从标记转换系统描述自

动生成测试用例的方法,我们研究如何从Statechart描述自动生成测试用例。本文的主要贡献在于建立了基

于Statechart描述的一致性测试和测试用例生成的形式化基础。为Statechart描述建立了形式化测试语义,

测试语义与传统的验证语义不同,强调可观察性和内部细节隐藏。基于形式化测试语义和测试假设,形式化

定义了系统描述和系统实现之间的一致性关系/实现关系。然后给出了基于图遍历的测试用例生成算法,对

于无环测试语义该算法可以生成完全测试集,而对于带环测试语义该算法可以生成高效率的宽泛测试集。

本文引用格式

苗春雨1,陈丽娜2,赵建民2 . 基于一致性测试理论的Statechart描述的测试用例自动生成[J]. 计算机工程与科学, 2011 , 33(3) : 82 -89 . DOI: 10.3969/j.issn.1007130X.2011.

Abstract

This paper studies testing semantics and automatic test case generation for

Statechart specification. Applying Tretmans’ approach to generate test cases for I/O automata

from labeled transition systems, we provide a solid mathematical basis for conformance testing

and automatic test case generation for Statechart specification. We introduce formal testing

semantics of Statechart specification that go beyond the semantics presented for formal

verification. These observable testing semantics can be used for general application, critical

application and realtime application. We also propose a formal conformance testing relation

based on presenting formal semantics and test hypothesis, and provide an algorithm which, for

a Statechart specification, generates a test suites. For finiteruns semantics the algorithm

can generate complete test suites, and for infiniteruns semantics only sound test suite can

be generated.

参考文献

[1]Harel D. Statecharts: A Visual Formalism for Complex Systems[J]. Science of Computer

Programming, 1987, 8(3):231274.
[2]Harel D,Pnueli A. On the Development of Reactive Systems[J]. Logic and Model of

Concurrent Systems, 1984, 13:477498.
[3]Tretmans J. Test Generation with Inputs, Outputs and Repetitive Quiescence[J]. Software

Concepts and Tools, 1996, 17(3):103120.
[4]Tretmans J. Testing Concurrent Systems: A Formal Approach[C]∥Proc of CONCUR’99,

1999:4665.
[5]Tretmans J. Conformance Testing with Labelled Transition Systems: Implementation

Relations and Test Generation[J].Computer Networks and ISDN Systems, 1996, 29(1):4979.
[6]Brinksma E,Tretmans J. Testing Transition Systems: An Annotated Bibliography[C]∥Proc

of MOVEP’00, 2001:187195.
[7]Latella D, Majzik I, Massink M. Towards a Formal Operational Semantics of UML Statechart

Diagrams[C]∥Proc of FMOODS’99,1999:331347.
[8]Latella D,Massink M. A Formal Testing Framework for UML Statechart Diagrams Behaviours:

From Theory to Automatic Verification[C]∥Proc of the 6th IEEE Int’l HighAssurance

Systems Engineering Symp,2001:1122.
[9]Latella D,Massink M. On Testing and Conformance Relations of UML Statechart Diagrams

Behaviours[C]∥Proc of the ACM SIGSOFT 2002 Int’l Symp on Software Testing and

Analysis,2002:144153.
[10]Gnesi S, Latella D, Massink M. Formal TestCase Generation for UML Statecharts[C]∥

Proc of ICECCS’04,2004:7584.
[11]Leveson N G, Heimdahl M P E,Hildreth H,et al. Requirements Specification for Process

Control Systems[J]. IEEE Transactions on  Software Engineering, 1994, 20(9):684707.
[12]Selic B, Gullekson G, Ward P T. RealTime ObjectOriented Modeling[M]. John Wiley &

Sons, 1994.
[13]Booch G, Rumbaugh J, Jacobson I. The Unified Modeling Language User Guide[M]. Addison

Wesley, 1998.
[14]Harel D, Pnueli A, Schmidt J P, et al. On the Formal Semantics of Statecharts(Extended

Abstract)[C]∥Proc of Logic in Computer Science, 1987:5464.
[15]Harel D,Naamad A. The STATEMATE Semantics of Statecharts[J]. ACM Transactions on

Software Engineering Methodology, 1996, 5(4):293333.
[16]董威, 王戟, 齐治昌.UMLStatecharts的模型检验方法[J]. 软件学报, 2003, 14(4):750756.
[17]Bernot G. Testing Against Formal Specifications: A Theoretical View[C]∥Proc of

TAPSOFT’91,1991:99119.
[18]Tretmans J. A Formal Approach to Conformance Testing:[Ph D Thesis][D].University of

Twente (NL), 1992.

文章导航

/