In recent years, the widespread use of the object oriented (OO) paradigm has given rise to the need of defining suitable models for describing and analysing the characteristics of complex systems designed according to it. OO system models come usually accompanied by graphical notations, so that the relationships between the elements forming the system can be easily visualized.
UML, the Unified Modeling Language, is the emerging graphical notation to model, document and specify OO systems along all the phases of the software process. Indeed, there exist now many studies about using UML for design, and many tools are available. However, only a little part of these studies so far has addressed the usage of UML for testing, and none of the available commercial tools provide specific assistance for test planning from the UML descriptions.
In this paper we address UML-based testing. Some authors have proposed methods to translate an UML description into another formal description, and then derive the tests from the latter (e.g., ). This is not our goal: we aim at a test method that is entirely based on UML, so that it can be easily adopted by industries already using UML. Some other recent studies propose methods to automatically derive test cases from UML statecharts (e.g., , ). These studies are interesting, and we see them as complementary to ours, as we do not use statechart diagrams, but higher level descriptions of the system. Indeed, we want to address test planning for the integration test phase starting from the very first stages of system design.
We present an approach for UML-based test planning, that is called Use-Interaction testing, as it mainly uses the UML Use Case and Interaction diagrams (specifically, the Message Sequence diagram). Indeed, integration testing is aimed at verifying that the pre-tested system components interact correctly. UML Interaction diagrams can provide the information of how the system components should interact.
The proposed methodology is very simple, and is inspired at large by the well-known Category Partition method : we first look at the Use Case diagram to identify the suitable steps of an incremental bottom-up test strategy. For each identified sub-Use Case, we then look at the Message Sequence diagram to identify the relevant components, or "Test Units". For each Test Unit, we derive the relevant "Settings" (could be parameters, variables, environmental states) and the relevant "Interactions" (essentially, messages from other Test Units), and identify for them the significant "Choices" (with the same meaning of the Category Partition method). To do this, we can analyse the related Class Diagrams, as well as other design documentation. Hence, by following the sequences of messages between the components over the Message Sequence Diagram, we construct the Test Cases, whereby each Test Case is characterized by a combination of all suitable choices of the involved Settings and Interactions.
We have applied the method to a case study, Argo/UML . Argo/UML is an open source tool that provide cognitive support to system design. We have developed quite a few Test Cases, and we have been able to identify a few bugs in the case study. However, the method is currently manual, and still under evaluation. Our short term plan is the realization of a tool that support it, by smoothly expanding an existing UML design tool.
In the paper we will describe the method in more detail, through examples on the Argo/UML tool, and also will provide a UML definition of the method itself by means of the UML extension mechanism of stereotypes.
Antonia Bertolino graduated (Laurea degree) cum laude in Electronic Engineering at the University of Pisa in 1985. Since 1986, she has been a researcher with the Institute for Information Processing of the Italian National Research Council (CNR), in Pisa, where she currently heads the Research Department on "Methods and Tools for Software Systems". Her research interests are in software engineering, especially testing, and in software dependability. Currently she is investigating approaches for rigorous integration test strategies and for improving the cost/effectiveness of testing techniques, as well as methods for the evaluation of software reliability. On these topics, she also likes to stay in touch with industries.
Since 1994, she is an Associate Editor of the Journal of Systems and Software, North-Holland, and recently has also joined the Editorial Board of the IEEE Transactions on Software Engineering. She has been the General Chair of the Second International Conference "Achieving Quality in Software AquIS '93", held in Venice (Italy) in October 93. She has been member of the International Programme Committees of several conferences and symposia, including ISSTA, Joint ESEC-FSE, ICSE, SEKE, Safecomp and Quality Week. She is currently Key Area Specialist for the Software Testing Knowledge Area of the Stone Man phase of the ACM/IEEE project Guide to the SWEBOK (Software Engineering Body of Knowledge). She has published over 40 papers in international journals and conferences.