Software Engineering UMLbased Integration Testing Jean Hartmann Claudio

Software Engineering UML-based Integration Testing Jean Hartmann, Claudio Imoberdorf Siemens Corporate Research Princeton NJ 08540 Tel: ++1 609 734 3361 Fax: ++1 609 734 6565 Email: jhartmann@scr. siemens. com UML-based Integration Testing ISSTA 2000 1

Software Engineering Objectives a Growing Importance of Domain-specific Frameworks a Modeling of Software Components and their Interfaces u. Using a standardized design notation => UML u. The model must express the component interactions a Using the Model for Test Generation and Execution u. Focusing on unit and integration testing (black-box) u. Automating the test generation and execution steps u. Providing test execution support for middleware-based components UML-based Integration Testing ISSTA 2000 2

Software Engineering Modeling Components a a Use UML Statecharts to model each component (object) Statecharts should reflect the normal and erroneous behavior of the component To facilitate component interaction, we extend UML with a new transition labeling scheme For integration testing, users define the collection of components to be tested ( subsystem definition) a Assumptions: u. Point-to-point communication semantics between components rather than a shared event model u. Communications are synchronous (blocking) u. Implementation is deterministic UML-based Integration Testing ISSTA 2000 3

Software Engineering Steps Taken During Model Composition 1. Normalizing the UML-based Models u. Importing the Rational Rose repository u. Noting the subsystem definition, if any u. Resolving transitions with multiple events 2. Composing the Global Behavioral Model u. Applying an incremental composition and reduction algorithm u. Determining a composition order (based on subsystem definition) a Scalability u. Algorithm complexity is better than exponential UML-based Integration Testing ISSTA 2000 4

Software Engineering Example: A Communication Protocol A a Focus on integration testing a Generate test cases to validate component interaction a Consider subsystem A a External interfaces: utuser utimer utxport a Internal Interfaces: utiming UML-based Integration Testing ISSTA 2000 5

Software Engineering Matching Send and Receive Events Between Components Com_chan nel Send_u ser Timeou t_contr ol timing Timer Transmitter UML-based Integration Testing ISSTA 2000 6

Software Engineering Normalizing the UML-based Models. . . Original Transmitter UML-based Integration Testing ISSTA 2000 Transmitter (expanded) 7

Software Engineering Composing a Global Behavioral Model. . . user channel Transmitter (expanded) compose timing Timer (expanded) timer Transmitter_Timer (composed) UML-based Integration Testing ISSTA 2000 8

Software Engineering Test Case Generation TEST CASE #1 * IN user. message(); * OUT channel. send * IN channel. ack(); TEST CASE #2 * IN user. message(); * OUT channel. send * IN timer. interrupt(); * OUT channel. send * IN channel. ack(); * IN user. message(); * OUT channel. send * IN channel. ack(); Test Cases for Subcomponent Transmitter_Timer (composed) UML-based Integration Testing ISSTA 2000 For integration testing: all transitions between components are covered 9

Software Engineering Test Case Execution a Executable test driver is created from the generated test cases a We have specific support for reactive components a This is achieved through an event pattern matching mechanism a Supports automated regression testing during unit and integration testing UML-based Integration Testing ISSTA 2000 10

Software Engineering Implementation : Tn. T = TDE/UML + TECS COM Interface & TSL Test Design Rational Rose Modeling Tool UML-based Integration Testing ISSTA 2000 Test Generation Tool (TDE/UML) Interface Test Language (ITL) Test Execution Environment (TECS) 11

Software Engineering Applying Tn. T in the Software Lifecycle Development Process Artifacts Inception Use Cases Elaboration High-level Design Construction Transition Detailed Design Tn. T System Test UML-based Integration Testing ISSTA 2000 Integration Test Unit Test 12

Software Engineering Future Research and Development a Modeling u. Support additional UML model elements (e. g. nested states) u. Examine the issues related to asynchronous communication between components u. Modeling real-time aspects (e. g. timing constraints) u. Develop a philosophy for an optimal composition order a Test Generation u. Exploit the use of data variations within test generation for integration testing purposes a Test Execution u. Focus on a distributed test execution environment UML-based Integration Testing ISSTA 2000 13

Software Engineering Conclusions a We provide a UML-based test generation and execution environment using Statecharts a We focus on unit and integration testing for components a We support the testing of middleware-based components a We are starting to apply it within Siemens a We are continuing to refine and improve Tn. T UML-based Integration Testing ISSTA 2000 14
- Slides: 14