Increasing numbers of software developers are using the Unified Modeling Language (UML) and associated visual modeling tools as a basis for the design and implementation of their distributed, component-based applications. Once developed, however, test cases must be designed, generated and executed to validate the components. This is especially important for unit and integration testing.
At Siemens Corporate Research, we are addressing this issue by integrating our test generation and test execution technology with commercial UML modeling tools such as Rational Rose; the goal being a design-based testing environment.
In order to generate test cases automatically, developers first define the dynamic behavior of their components via UML Statechart Diagrams. These views then need to be annotated with additional, test-specific information such as coverage criteria, data variations and interconnected, in the case of multiple components.
With the help of our test generation technology, test cases are then systematically derived from the annotated UML StateChart Diagrams and executed using our test execution environment, which was developed specifically for interfacing to components based on COM/DCOM and CORBA/IDL middleware.
Providing such a design-based testing environment ensures major benefits for developers:
With minimal additional effort, developers can reuse their component designs as test specifications. In the case of code changes, these test specifications can be updated and used as a basis for automatically generating a new set of regression tests.In future, we see the delivery of software components being accompanied with a standardized test specification, possibly based on UML StateChart Diagrams. This will be necessary to ensure compliance of the component as it is integrated into a larger software system.
Developers no longer need to manually implement custom test drivers for components, which can be especially tedious and error-prone in the case of distributed components. Executable test drivers are automatically generated directly from the test specifications.
The environment can be applied to individual as well as a collection of components, making it suitable for use during unit and integration testing.
Jean Hartmann is a project manager at Siemens Corporate Research responsible for software testing technology. His research interests focus on new techniques and tools for testing components, graphical user interfaces, and internet-based systems. He received the Ph.D. degree in computer science from the University of Durham, UK, in 1993 where is thesis topic emphasized improved regression testing techniques.
Claudio Imoberdorf is a Member of the Technical Staff at Siemens Corporate Research. He has seven years experience in the area of software design, software developmemnt, and component technologies. Prior to joining Siements he was a lead designer on a component-based building automation system at Siemens Building Technology, Switzerland.