Automated Object ’ s Statechart Generation and Testing from Class Method Contracts

The link between an object’s class specifications and UML statechart is rather informal and poses consistency issues during software evolution. We address this issue by proposing a connection between class diagram and statechart in a lock-step fashion, which leads to a coherent design for better development, testing, and maintenance of the software system. In this paper, we describe an approach for generating a statechart for an object from its method contracts. We then show how the generated object statechart can be used for performing automated testing at unit level. We illustrate the approach using a simple example and discuss its effectiveness as a V&V step during software evolution.

[1]  José Luiz Fiadeiro,et al.  Interconnecting Objects Via Contracts , 1999, UML.

[2]  Massimiliano Di Penta,et al.  Assessing and improving state-based class testing: a series of experiments , 2004, IEEE Transactions on Software Engineering.

[3]  Doo-Hwan Bae,et al.  Test cases generation from UML state diagrams , 1999, IEE Proc. Softw..

[4]  Jean-Marc Jézéquel,et al.  Design by Contract: The Lessons of Ariane , 1997, Computer.

[5]  Jon Whittle,et al.  From scenarios to code: An air traffic control case study , 2004, Software & Systems Modeling.

[6]  Erkki Mäkinen,et al.  An Interactive Approach for Synthesizing UML Statechart Diagrams from Sequence Diagrams , 2000, OOPSLA 2000.

[7]  Giuliano Antoniol,et al.  A case study using the round-trip strategy for state-based class testing , 2002, 13th International Symposium on Software Reliability Engineering, 2002. Proceedings..

[8]  Tsun S. Chow,et al.  Testing Software Design Modeled by Finite-State Machines , 1978, IEEE Transactions on Software Engineering.

[9]  A. Jefferson Offutt,et al.  Generating Tests from UML Specifications , 1999, UML.

[10]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[11]  T. Systa,et al.  MAS - an interactive synthesizer to support behavioral modeling in UML , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[12]  Ian M. Holland,et al.  Contracts: specifying behavioral compositions in object-oriented systems , 1990, OOPSLA/ECOOP '90.

[13]  Johann Schumann,et al.  Generating statechart designs from scenarios , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[14]  Lionel C. Briand,et al.  Using simulation to empirically investigate test coverage criteria based on statechart , 2004, Proceedings. 26th International Conference on Software Engineering.

[15]  Doo-Hwan Bae,et al.  A test sequence selection method for statecharts , 2000, Softw. Test. Verification Reliab..

[16]  Sebastián Uchitel,et al.  A workbench for synthesising behaviour models from scenarios , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.