Using State Diagrams to Generate Unit Tests for Object-Oriented Systems

  • Florentin Ipate
  • Mike Holcombe
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3556)

Abstract

Traditionally, finite state machines and their extensions, such as stream X-machines, have been used for modelling and testing of graphical user interfaces (GUI) and for acceptance testing. This paper shows how these testing techniques can be successfully extended to unit test generation for object-oriented systems and integrated into Extreme Programming in a simple and designer-friendly way. The approach has been used by MSc students in Computer Science at the Pitesti University to write JUnit tests for XP projects and the effectiveness of these tests has been compared with that of tests produced using ad-hoc and traditional functional methods. The conclusions show that over 90 % of the faults found by other methods have also been found by the stream X-machine based approach, whereas less than 75 % (in many instances less than half) of the faults uncovered by the stream X-machine based testing have been found by other methods. As the finite state machine based test generation has been automated, the time spent using the two testing strategies was roughly equal.

Keywords

unit testing functional testing state diagrams finite state machines stream X-machines 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Holcombe, M., Ipate, F.: Correct Systems: Building a Business Process Solution. Springer, Berlin (1998)MATHGoogle Scholar
  2. 2.
    Ipate, F., Holcombe, M.: An Integration Testing Method That is Proved to Find all Faults. Intern. J. Computer Math. 63, 159–178 (1997)MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Jeffries, R., Anderson, A., Hendrickson, C.: Extreme programming installed. Addison-Wesley, Reading (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Florentin Ipate
    • 1
  • Mike Holcombe
    • 2
  1. 1.IFSoftRomania
  2. 2.Department of Computer ScienceUniversity of SheffieldUK

Personalised recommendations