Reuse in TTCN3 Test System Matti Krki Mikko

  • Slides: 14
Download presentation
Reuse in TTCN-3 Test System Matti Kärki & Mikko Karinsalo TTCN-3 User Conference Sophia

Reuse in TTCN-3 Test System Matti Kärki & Mikko Karinsalo TTCN-3 User Conference Sophia Antipolis, 6 - 8 June 2005

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Contents • Motivation for the study • Approaches

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Contents • Motivation for the study • Approaches and techniques in software reuse • Reuse in TTCN-3 test system • Real-life example • Conclusions 7. 10. 2020 2

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Background • Software reuse aims to increase product

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Background • Software reuse aims to increase product quality and productivity of the software development process • Also, the maintenance of a variety of products benefits from software reuse • Same approaches and techniques that are used in software development to increase reusability should be applicable to TTCN 3 test system development • all software has some potential for reuse and therefore also test software has potential for reuse • By including software reuse approaches in the TTCN-3 test system development, we can potentially create reusable TTCN-3 test system entities and compose them in a different ways to create 7. 10. 2020 3 TTCN-3 test systems to specific need

VTT TECHNICAL RESEARCH CENTRE OF FINLAND The Approach • The objective of this study

VTT TECHNICAL RESEARCH CENTRE OF FINLAND The Approach • The objective of this study is to increase the efficiency of the TTCN 3 test system development through reuse • Current approaches and techniques for software reuse were analyzed • The standardized TTCN-3 test system structure and entities were investigated • Result: Approach for TTCN-3 test system composition and development of TTCN-3 test system entities that takes reuse into account 7. 10. 2020 4

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Software Reuse • Two schools of reuse architecture-driven

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Software Reuse • Two schools of reuse architecture-driven reusable part 7. 10. 2020 component-driven product specific part 5

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Software Reuse: The Combined Approach • Architecture driven

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Software Reuse: The Combined Approach • Architecture driven reuse avoids architectural mismatches and is planned when developing new software • Component driven emphasises opportunistic use of already written software (e. g. , third party component markets) Different products are realized with different component compositions and components are adaptable to different products common part 7. 10. 2020 specific part 6

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Making components reusable • Libraries • used ‘as

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Making components reusable • Libraries • used ‘as is’ • building blocks of components • Parametrization • selecting alternative piece of code • type and value parametrization • Inheritance • enables specilization of classes • enables object-oriented frameworks • Extensions • plug-ins are used to additional behaviour to the component • subtle difference between component frameworks and plug-in frameworks 7. 10. 2020 7

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Gluing components together • System languages • for

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Gluing components together • System languages • for gluing and system integration these languages require large amounts of glue and conversion code • Scripting languages • the scripting languages are intended for plugging components together and thus operate on a higher level of abstraction than system languages • Visual programming • works on a higher level of abstraction than scripting and system languages. Nevertheless, effort involved in applying this technique are the disadvantages • Component frameworks • overcome the disadvantage of the system and scripting languages as well as visual programming where the glue code has to be specified graphically or written from scratch 7. 10. 2020 8

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Binding components • Development time • copy and

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Binding components • Development time • copy and paste reuse • white-box reuse re-factor to make it reusable • Compile time • use of pre-processor directives • instruct compiler which file to compile • Link time • instruct linker which file to link • after delivery, replace an entire file with a new copy • Run time flexible (reusable) • start-up time (e. g. , configuration files) systems • per call 7. 10. 2020 9

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Putting It All Together: TTCN-3 Test System Reuse

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Putting It All Together: TTCN-3 Test System Reuse Test Executable Comp. Framework 1. . n SA 1. . n CD 7. 10. 2020 1 PAT 0. . n PAXF • TTCN-3 test system entities as reusable components • any variability mechanism is applicable within component • any binding time is applicable within component • TTCN-3 test systems are build with different component compositions • component framework binds the compoments at start up time using a configuration file • component framework calls right component using at run time (per call) using a configuration file 10

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Configuration files System configuration <test-system> <component type=”system-adapter”> <class

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Configuration files System configuration <test-system> <component type=”system-adapter”> <class name=”Example. SA”/> <package name=”Example. SA. jar”/> </component> <component type=”codec”> <class name=”Example. Codec”/> <package name=”Example. CD. jar”/> </component> <component type=”pa-timer”> <class name=”Example. Timer”/> <package name=”Example. Timer. jar”/> </component> </test-system> 7. 10. 2020 SA configuration <system-adapter> <component moduleid="My. Module" typeid="My. TSI"> <port type="PCO 1"/> <port type="PCO 2"> <instance name="myport" array-min="0" array max="2"/> <instance name="myport 2"/> </port> </system-adapter> 11

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Example Component framework Plug-in framework SUT TTCN-3 Test

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Example Component framework Plug-in framework SUT TTCN-3 Test System Parametrization & library (value parametrization) T 3 Framework Remote. Sa Api calls IUT specific part Iut. Api. Sa Cpp. Cd 'As is' IUT Iut. Msg. Cd Iut messages Library Iut. Msg. Sa Parametrization (alternative piece of code) 7. 10. 2020 12

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Conclusions • The framework predefines the "routing" information

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Conclusions • The framework predefines the "routing" information • if-else structures can be avoided • XML files are used instead • allows run-time binding of test system components instead of compile time • The framework could be part of TTCN-3 RTS • framework itself is a reusable component • supports reuse by decoupling logical entities while preserving standard interfaces • The component framework supports distribution of SA/PA operations • The component reusability requires activities for analysis and design of the problem scope • design patterns for test system reuse, or • include these activities into test system development 7. 10. 2020 13 process

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Thank You Authors Matti Kärki matti. karki@vtt. fi

VTT TECHNICAL RESEARCH CENTRE OF FINLAND Thank You Authors Matti Kärki matti. karki@vtt. fi Mikko Karinsalo mikko. karinsalo@vtt. fi 7. 10. 2020 14