Skip to main content
Log in

Automated support for deriving test requirements from UML statecharts

  • Special Issue Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

Many statechart-based testing strategies result in specifying a set of paths to be executed through a (flattened) statechart. These techniques can usually be easily automated so that the tester does not have to go through the tedious procedure of deriving paths manually to comply with a coverage criterion. The next step is then to take each test path individually and derive test requirements leading to fully specified test cases. This requires that we determine the system state required for each event/transition that is part of the path to be tested and the input parameter values for all events and actions associated with the transitions. We propose here a methodology towards the automation of this procedure, which is based on a careful normalization and analysis of operation contracts and transition guards written with the Object Constraint Language (OCL). It is illustrated by one case study that exemplifies the steps of our methodology and provides a first evaluation of its applicability.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  • OMG.: UML 1.4 Specification. Object Management Group, Complete Specification formal/01-09-67 (2001)

  • Bruegge, B., Dutoit, A.H.: Object-Oriented Software Engineering Using UML, Patterns, and Java, 2nd edn. Prentice-Hall, Englewood Cliffs, NJ (2004)

    Google Scholar 

  • Binder, R.V.: Testing Object-Oriented Systems—Models, Patterns, and Tools. Object Technology. Addison-Wesley, Reading, MA (1999)

    Google Scholar 

  • Offutt, A.J., Abdurazik, A.: Generating Tests from UML specifications. In: Proceedings of the 2nd International Conference on the Unified Modeling Language (UML`99), Fort Collins, CO, pp. 416–429 (1999)

  • Beizer, B.: Software Testing Techniques, 2nd edn. Van Nostrand Reinhold, NY (1990)

    Google Scholar 

  • OMG.: UML 1.4 chapter 6—OCL Specification. Object Management Group, Complete Specification formal/01-09-67 (2001)

  • Warmer, J., Kleppe, A.: The Object Constraint Language. Addison-Wesley, Reading, MA. Errata at http://www.klasse.nl/english/boeken/errata.html (1999)

  • Meyer, B.: Object-Oriented Software Construction—2nd edn. Prentice-Hall, Englewood Cliffs, NJ (1997)

    Google Scholar 

  • Mitchell, R., McKim, J.: Design by Contract, by Example. Addison-Wesley, Reading, MA (2001)

    Google Scholar 

  • Chevalley, P., Thévenod-Fosse, P.: Automated Generation of Statistical Test Cases from UML State Diagrams. In: Proceedings of the International Computer Software and Applications Conference, Chicago, IL, pp. 205–214 (2001)

  • Chow, T.S.: Testing software design modeled by finite-state machines. IEEE Trans. Softw. Eng. SE-4(3), 178–187 (1978)

    Google Scholar 

  • Lee, D., Yannakakis, M.: Principles and methods of testing finite state machines—a survey. Proc. IEEE 84(8), 1090–1123 (1996)

    Article  Google Scholar 

  • Bogdanov, K., Holcombe, M.: Statechart testing method for aircraft control Systems. Softw. Test. Verification Reliability 11(1), 39–54, (2001)

    Google Scholar 

  • Li, L., Qi, Z.: Test selection from UML statecharts. In: Proceedings of Technology of Object-Oriented Languages and Systems, pp. 273–279 (1999)

  • Hong, H.S., Kim, Y.G., Cha, S.D., Bae, D.H., Ural, H.: A test sequence selection method for statecharts. Softw. Testing Verification Reliability 10(4), 203–227 (2000)

    Google Scholar 

  • Kim, Y.G., Hong, H.S., Cho, S.M., Bae, D.H., Cha, S.D.: Test case generation from UML state diagrams. Proc. IEE Softw. 146(4), 187–192 (1999)

    Google Scholar 

  • OMG.: OCL 2.0 Specification. Object Management Group, Final Adopted Specification ptc/03-10-14 (2003)

  • OMG.: UML 2.0 Superstructure Specification. Object Management Group, Final Adopted Specification ptc/03-08-02 (2003)

  • Tanenbaum, A.S., Modern Operating Systems, 2nd edn. Prentice-Hall, Englewood Cliffs, NJ (2001)

    Google Scholar 

  • Douglass, B.P.: Real Time UML, 3rd edn. Addison-Wesley, Reading, MA (2004)

    Google Scholar 

  • Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: A dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997)

    Article  Google Scholar 

  • Booch, G., Rumbaugh, J., Jacobson, I.: The Unified Modeling Language User Guide. Addison Wesley, Reading, MA (1999)

    Google Scholar 

  • Rumbaugh, J., Jacobson, I., Booch, G.: The Unified Modeling Language Reference Manual. Addison Wesley, Reading, MA (1999)

    Google Scholar 

  • Huth, M.R.A., Ryan, M.D.: Logic in Computer Science, Modelling and Reasoning about Systems. Cambridge University Press, Oxford, UK (2000)

    Google Scholar 

  • Finger, F.: Design and Implementation of a Modular OCL Compiler. Master Thesis, Dresden University of Technology, Dresden, Germany (2000)

  • Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns—Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, MA (1995)

    Google Scholar 

  • Briand, L.C., Labiche, Y., Yan, H.-D., Di Penta, M.: A controlled experiment on the impact of the object constraint language in UML-based development. In: Proceedings of the IEEE International Conference on Software Maintenance, Chicago, pp.~380–389 (2004)

  • Briand, L.C., Cui, J., Labiche, Y.: Towards Automated Support for Deriving Test Data from UML Statecharts. Carleton University, Ottawa, Canada, Technical Report SCE-03-13, http://www.sce.carleton.ca/Squall. (2003)

  • Mitchell, R.: Analysis by contract—Video store case study. University of Brighton, Brighton, UK, Technical Report, http://www.it.brighton.ac.uk/staff/rjm4 (1999)

  • Offutt, A.J., Xiong, Y., Liu, S.: Criteria for Generating Specification-Based Tests. In: Proceedings of the 5th International Conference on Engineering of Complex Computer Systems (ICECCS), Las Vegas, NV, pp. 119–129 (1999)

  • Cui, J.: Towards Automated Support for Deriving Test Data from UML Statecharts. Master Thesis, Carleton University, Ottawa, Canada, Systems and Computer Enginerring (2004)

  • Chambers, L.: Practical Handbook of Genetic Algorithms, vol. 1. CRC, Boca Raton, FL (1995).

  • Michalewicz, Z.: How to Solve it: Modern Heuristics. Springer-Verlag, Berlin Heidelberg New York (1999)

    Google Scholar 

  • Mellor, S.J., Balcer, M.J.: Executable UML: A Foundation for Model-Driven Architecture. Addison-Wesley, Reading, MA (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to L. C. Briand.

Additional information

The scope of the testing activity depends on what is modeled by the statechart. If the statechart models the behavior of a single class, then it can be used to support unit testing. If the behavior of a class-cluster, a subsystem or a component is modeled, then we are concerned with integration testing. If the whole system is modeled, then the focus of statechart-based testing is system testing.

Lionel C. Briand is on the faculty of the Department of Systems and Computer Engineering, Carleton University, Ottawa, Canada, where he founded and leads the Software Quality Engineering Laboratory (http://www.sce.carleton.ca/Squall/ Squall.htm). He has been granted the Canada Research Chair in Software Quality Engineering and is also a visiting professor at the Simula laboratories, University of Oslo, Norway. Before that he was the software quality engineering department head at the Fraunhofer Institute for Experimental Software Engineering, Germany.

Dr. Lionel also worked as a research scientist for the Software Engineering Laboratory, a consortium of the NASA Goddard Space Flight Center, CSC, and the University of Maryland. He has been on the program, steering, or organization committees of many international, IEEE conferences such as ICSE, ICSM, ISSRE, and METRICS. He is the coeditor-in-chief of Empirical Software Engineering (Springer) and is a member of the editorial board of Systems and Software Modeling (Springer). He was on the board of IEEE Transactions on Software Engineering from 2000 to 2004.

His research interests include: object-oriented analysis and design, inspections and testing in the context of object-oriented development, quality assurance and control, project planning and risk analysis, and technology evaluation. Lionel received the BSc and MSc degrees in geophysics and computer systems engineering from the University of Paris VI, France. He received the PhD degree in computer science, with high honors, from the University of Paris XI, France.

Yvan Labiche received the BSc in Computer System Engineering, from the graduate school of engineering: CUST (Centre Universitaire des Science et Techniques, Clermont-Ferrand), France. He completed a Master of fundamental computer science and production systems in 1995 (Université Blaise Pascal, Clermont Ferrand, France). While doing his Ph.D. in Software Engineering, completed in 2000 at LAAS/CNRS in Toulouse, France, Yvan worked with Aerospatiale Matra Airbus (now EADS Airbus) on the definition of testing strategies for safety-critical, on-board software, developed using object-oriented technologies.

In January 2001, Dr. Yvan Labiche joined the Department of Systems and Computer Engineering at Carleton University, as an Assistant Professor. His research interests include: object-oriented analysis and design, software testing in the context of object-oriented development, and technology evaluation. He is a member of the IEEE.

Jim (Jingfeng) Cui completed his BSc in Industrial Automation Control, from the School of Information and Engineering, Northeastern University, China. He received a Master of Applied Science (specialization in Software Engineering) in 2004 from the Ottawa-Carleton Institute of Electrical and Computer Engineering, Ottawa, Canada. While in his graduate study, he was awarded the Ontario Graduate Scholarship of Science and Technology. He is now a senior Software Architect in Sunyard System & Engineering Co.Ltd., China. His interest includes Object-Oriented Software Development, Quality Assurance, and Content Management System.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Briand, L.C., Labiche, Y. & Cui, J. Automated support for deriving test requirements from UML statecharts. Softw Syst Model 4, 399–423 (2005). https://doi.org/10.1007/s10270-005-0090-5

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-005-0090-5

Keywords

Navigation