A Framework for UML-Based Software Component Testing

  • Weiqun Zheng
  • Gary Bundell
Part of the Lecture Notes in Electrical Engineering book series (LNEE, volume 6)

Component-based software engineering (CBSE) is becoming a widely used software engineering approach to reduce software development costs and sustain rapid software production. Software component testing (SCT) denotes a set of testing activities that analyse software artefacts, uncover software faults, and evaluate software correctness and quality of software components under test (CUT) and component-based software or systems (CBS) [1, 2]. SCT focuses on producing component test cases (CTCs) that are the central part of all SCT tasks. Although component functionality and reusability are always needed in software component design/development (SCD), SCT considerably influences component reliability and quality [3], which, in a certain sense, could determine whether CBS succeeds in the CBSE practice. SCT becomes an integral part of the SCD lifecycle in CBSE.

In this chapter, we present a new UML-based SCT methodology, model-based software component testing (MBSCT), which aims to leverage SCT with software component modeling (SCM) for SCD, and achieve an effective integration of SCT with UML modeling towards SCT practice. The main contribution of this chapter is that the MBSCT methodology introduces a new SCT framework that is supported with a set of useful SCT techniques. The MBSCT framework provides a major twophase workflow process to develop CTCs with UML modeling: the first phase builds a set of UML-based test models, which is supported with the scenario-based CIT and test by contract techniques; the second phase designs and generates CTCs from the constructed test models, which is supported with a component test mapping technique. The derived CTCs are represented and specified with our XML-based CTS to become CTS test case specifications. The MBSCT methodology was initially proposed in [8], and this chapter describes and discusses it in more detail.

The remainder of the chapter is structured as follows. Section 40.2 reviews and discusses the related research work on software testing with UML modeling. Section 40.3 presents a methodology overview. Section 40.4 discusses how UMLbased test models are built from parallel SCM models. Section 40.5 describes improving testability for effective test design along with test model construction. Section 40.6 discusses how to derive CTCs from the constructed test models. A case study is illustrated throughout the chapter. Section 40.7 concludes this chapter and outlines future work.


Software Component Test Scenario Generate Test Case Object Interaction Software Artefact 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    R. V. Binder. Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley, 2000.Google Scholar
  2. 2.
    J. Z. Gao, H.-S. J. Tsao, and Y. Wu. Testing and Quality Assurance for Component-Based Software. Artech House, Sept. 2003.Google Scholar
  3. 3.
    A. Cechich, M. Piattini and A. Vallecillo (Eds.), Component-Based Software Quality: Methods and Techniques. LNCS2693, Springer, June 2003.Google Scholar
  4. 4.
    J. Morris, G. Lee, K. Parker, G. Bundell and C. P. Lam. Software component certification. IEEE Computer, vol. 34, no. 9, pp. 30–36, Sept. 2001.Google Scholar
  5. 5.
    J. Morris, C. P. Lam, G. Bundell, G. Lee and K. Parker. Setting a framework for trusted component trading. In A. Cechich, M. Piattini and A. Vallecillo (Eds.), Component-Based Software Quality: Methods and Techniques, LNCS 2693, pp. 101–131, Springer, June 2003.Google Scholar
  6. 6.
    A. Pretschner and J. Philipps. Methodological issues in model-based testing. In M. Broy, B. Jonsson, J. P. Katoen, M. Leucker, A. Pretschner (Eds.), Model-Based Testing of Reactive Systems, LNCS 3472, pp. 281–291, Springer, June 2005.Google Scholar
  7. 7.
    I. Jacobson, G. Booch and J. Rumbaugh. The Unified Software Development Process. Addison-Wesley, 1999.Google Scholar
  8. 8.
    W. Zheng and G. Bundell. A UML-based methodology for software component testing. Proceedings of The IAENG International Conference on Software Engineering (ICSE 2007), Hong Kong, pp. 1177–1182, March 2007.Google Scholar
  9. 9.
    J. Offutt and A. Abdurazik. Generating tests from UML specifications. Proceedings of 2nd International Conference on the Unified Modeling Language: Beyond the Standard (UML’99), Fort Collins, CO, Oct. 1999. LNCS 1723, pp. 416–429, Springer, 1999.Google Scholar
  10. 10.
    A. Abdurazik and J. Offutt. Using UML collaboration diagrams for static checking and test generation. Proceedings of 3rd International Conference on the Unified Modeling Language: Advancing the Standard (UML’00), York, UK, Oct 2000. LNCS 1939, pp. 383–395, Springer, 2000.Google Scholar
  11. 11.
    L. C. Briand and Y. Labiche. A UML-based approach to system testing. Journal of Software and Systems Modeling, vol. 1, no. 1, pp. 10–42, Sept. 2002.CrossRefGoogle Scholar
  12. 12.
    J. Warmer and A. Kleppe. The Object Constraint Language: Getting Your Models Ready for MDA. 2nd Edition, Addison-Wesley, 2003.Google Scholar
  13. 13.
    Y. Wu, M.-H. Chen and J. Offutt. UML-based integration testing for component-based software. Proceedings of 2nd International Conference on COTS-Based Software Systems (ICCBSS 2003), Ottawa, Canada, 10–12 Feb. 2003. LNCS 2580, pp. 251–260, Springer, 2003.Google Scholar
  14. 14.
    W.-T. Tsai, R. Paul, L. Yu and X. Wei. Rapid pattern-oriented scenario-based testing for embedded systems. In Hongji Yang (Eds.), Software Evolution with UML and XML, pp. 222–262, Idea Group, London, 2005.Google Scholar
  15. 15.
    B. Meyer. Object-Oriented Software Construction. 2nd Edition, Prentice-Hall, 1997.Google Scholar
  16. 16.
    D. Brugali and M. Torchiano. Software Development: Case Studies in Java. Addison-Wesley, 2005.Google Scholar
  17. 17.
    E. Gamma, R. Helm, R. Johnson and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.Google Scholar
  18. 18.
    W. Zheng and G. Bundell. Model-based software component testing: A methodology in practice. Technical Report CIIPS_ISERG_TR-2006-01, School of Electrical, Electronic and Computer Engineering, University of Western Australia, 2006.Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  • Weiqun Zheng
    • 1
  • Gary Bundell
    • 1
  1. 1.Centre for Intelligent Information Processing Systems, School of Electrical, Electronic and Computer EngineeringUniversity of Western AustraliaCrawleyAustralia

Personalised recommendations