Michael Ebner Institute for Informatics · University of Göttingen · Germany TTCN-3 Test Case Generation from Message Sequence Charts ISSRE2004 - WITUL.

Slides:



Advertisements
Similar presentations
INTERVAL Next Previous 13/02/ Timed extensions to SDL Analysis requirements –Assumptions on moments and duration Semantics with controllable time.
Advertisements

System and Software Engineering Research 1 Motorola 2003 Integrated Application of MSC Clive Jervis Rapporteur Q15 Motorola UK Research Labs.
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Comparing TTCN-3 and TTCN-2 TTCN-3 User Conference May 3 rd -May 5 th,2004 Sophia Antipolis.
Tool support for Distributed Object Technology
GFT The Graphical Format of TTCN-3
The Use of TTCN-3 for Software Testing Ina Schieferdecker FOKUS, Berlin
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
SSP Re-hosting System Development: CLBM Overview and Module Recognition SSP Team Department of ECE Stevens Institute of Technology Presented by Hongbing.
Introduction To System Analysis and Design
Slide 1 MSC and SDL. Slide 2 Relationship of MSC to SDL An MSC describes one or more traces of an SDL system specification. An entity in MSC may map to.
Systems Engineering Project: System Validation and Verification Using SDL Ron Henry ENSE 623 November 30, 2004.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Software Testing and QA Theory and Practice (Chapter 10: Test Generation from FSM Models) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Introduction To System Analysis and design
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
UML REVIEW –PART1 1. Introduction What is UML visual modelling language UML is a language not a methodology? Q: why is this distinction important? UML.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
System and Software Engineering Research 1 Motorola Copyright 2001 A Perspective on Harmonisation: Benefits and Barriers Clive Jervis Rapporteur Q15 Motorola.
Introduction to MDA (Model Driven Architecture) CYT.
Unified Modeling Language, Version 2.0
2nd TTCN-3 User Conference, June The TTCN-3 Metamodel – A Basis for Tool Integration Ina Schieferdecker TU Berlin/Fraunhofer Fokus Hajo Eichler,
1. Validating Wireless Protocol Conformance Test Cases Amresh Nandan Paresh Jain June 2004.
Introduction To System Analysis and Design
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object Management Group (OMG) Specifies open standards for every aspect of distributed computing Multiplatform Model Driven Architecture (MDA)
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Institute for Telematics University of Lübeck, Germany M. Ebner, M. Schmitt, J. Grabowski Test Generation with Autolink and TestComposer.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Copyright SOLINET GmbH SDL & Requirements of Signalling Systems William H. Skelton SOLINET, Stuttgart.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
INTERVAL IST Institute for Telematics University of Lübeck Real-time extensions to MSC-2000 and TTCN-3 Helmut Neukirchen.
Gregor v. Bochmann, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher(2009) with material from Amyot User Requirements Notation (URN)
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Modeling the ODP Computational Viewpoint with UML 2.0: The Templeman Library Example José Raúl Romero, Antonio Vallecillo Universidad de Málaga, Spain.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
1 Unified Modeling Language, Version 2.0 Chapter 2.
FDT Foil no 1 MSC Structuring MSCs Using Message Sequence Charts for real systems.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Basic Characteristics of Object-Oriented Systems
TTCN-3 Testing and Test Control Notation Version 3.
© 2009 Artisan Software Tools. All rights reserved. Testing Solutions with UML/SysML Andrew Stuart, Matthew Hause.
Software test automation with UML2.0 TestingProfile & TTCN-3 Maili Markvardt.
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
XML-based Representation of Test Cases for Distributed Systems Alexander Kraas 7. October 2008.
STF 454 “DESIGN OF TDL” Proposed TDL features © ETSI All rights reserved.
An Overview of Requirements Engineering Tools and Methodologies*
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
STF 454 TDL – Overview Last change:
Systems Analysis and Design With UML 2
SIMPL-T: SDL Intended for Management and Planning of Tests By
Software Design Lecture : 15.
Introduction to Systems Analysis and Design Stefano Moshi Memorial University College System Analysis & Design BIT
Message Sequence Charts
Overview of the ETSI Test Description Language
Overview of the ETSI Test Description Language
STF 454 TDL – Overview Last change:
Comparing UML 2.0 Interactions and MSC-2000
Presentation transcript:

Michael Ebner Institute for Informatics · University of Göttingen · Germany TTCN-3 Test Case Generation from Message Sequence Charts ISSRE WITUL

2 TTCN-3 Test Case Generation from MSCs Overview  Concept  Mapping of MSC to TTCN-3  Related Concepts  Graphical Format of TTCN-3 (GFT)  UML Testing Profile (UTP)  Comparison  Summary

3 TTCN-3 Test Case Generation from MSCs Use Cases Classes Unified Modeling Language (UML) States Sequences Testing Unit Test System Test Integration Test

4 TTCN-3 Test Case Generation from MSCs UML-based Test Specification generate map TTCN-3 Data IDL UML TTCN-3 Behaviour MSC map Class Diagram Sequence, Activity, and Interaction Overview Diagram map use WSDL CORBA

5 TTCN-3 Test Case Generation from MSCs Overview  Concept  Mapping of MSC to TTCN-3  Related Concepts  Graphical Format of TTCN-3 (GFT)  UML Testing Profile (UTP)  Comparison  Summary

6 TTCN-3 Test Case Generation from MSCs MSC Test Purpose Description

7 TTCN-3 Test Case Generation from MSCs Message Descriptions [ ] [ ] q Matching mechanisms are only allowed for messages to be received from the SUT.

8 TTCN-3 Test Case Generation from MSCs Mapping I MSC Basic MSC HMSC instance axis note, comment, text comment chart name instance kind flow control instance creation TTCN-3 Testcase(s) Testcase calls (control part) represents a port (PCO) comment (ttcn-3,begin,position) Testcase name component name or SUT call or getreply procedure create component

9 TTCN-3 Test Case Generation from MSCs Mapping II MSC Message Flow control (Synchronise) Condition Timer Action Coregion Alternative, Option, and Exception Loop MSC reference TTCN-3 Send or receive message call or getreply procedure Synchronising Timer (start, stop, timeout) TTCN-3 Statements Interleave Alternative (incl. sync.) For or While loop (incl. sync.) Function call

10 TTCN-3 Test Case Generation from MSCs Example I – Mapping of MSC testcase InresRTexample() runs on inres { var float sendTime1:=-1.0; var integer iterator1:=0; for (iterator1:=0; iterator1<100; iterator1:=iterator1+1) { if (sendTime1==-1.0) { sendTime1:=self.now+0.01; } else { resume(sendTime1); sendTime1:=sendTime1+0.01; } log(TimestampType:{self.now,"IDATreq1"}); ISAP.send(IDATreq:{"data"}); MSAP.receive(MDATind:{DT,number,"data"}); log(TimestampType:{self.now,"MDATind2"}); MSAP.send(MDATreq:{AK,number}); } setverdict(pass); stop; }

11 TTCN-3 Test Case Generation from MSCs Example II – Mapping of MSC testcase InlineAlt() runs on syminres { ISAP1.send( ICONreq ) ISAP1.send( IDATreq ) ISAP2.receive( ICONind ) alt { [] ISAP2.receive( IDATind ){} [] ISAP1.receive( IDISind ) { ISAP1.send( ICONreq ) ISAP1.send( IDATreq ) ISAP2.receive( ICONind ) ISAP2.receive( IDATind ) } ISAP2.send( IDISreq ) ISAP1.receive( IDISind ) } mscInlineAlt ICONreq ISAP1syminresISAP2 ICONind alt IDATind IDISind ICONreq ICONind IDATind IDISreq IDISind SUT IDATreq

12 TTCN-3 Test Case Generation from MSCs Overview  Concept  Mapping of MSC to TTCN-3  Related Concepts  Graphical Format of TTCN-3 (GFT)  UML Testing Profile (UTP)  Comparison  Summary

13 TTCN-3 Test Case Generation from MSCs Overall Picture of TTCN-3 ASN.1 Types & Values Other Types & Values n TTCN-3 Core Language TTCN-3 User Tabular Format Graphical Format Presentation format n IDL Interfaces & Types XML Types IDL Interfaces & Types

14 TTCN-3 Test Case Generation from MSCs GFT I  Provides a test specific profile for MSC-2000  Defines generic extensions  Value returning GFT References  Hyper GFT  Hybrid GFT  Defines test specific extensions, e.g.  Port instances  Special Messages for instance handling  Type and Template definition for messages  Trigger and check message  Verdicts as special conditions  Defaults

15 TTCN-3 Test Case Generation from MSCs GFT II  Does not use  Gates  General Ordering  Time Concepts  MSC Reference Expression  Instance Decomposition  Assumed data types are TTCN-3 data types

16 TTCN-3 Test Case Generation from MSCs testcase InresRTexample() runs on inres{ var float sendTime1:=-1.0; var integer iterator1:=0; for (iterator1:=0; iterator1<100; iterator1:=iterator1+1) { if (sendTime1==-1.0) { sendTime1:=self.now+0.01; } else { resume(sendTime1); sendTime1:=sendTime1+0.01; } log(TimestampType:{self.now,"IDATreq1"}); ISAP.send(IDATreq:{"data"}); MSAP.receive(MDATind:{DT,number,"data"}); log(TimestampType:{self.now,"MDATind2"}); MSAP.send(MDATreq:{AK,number}); } setverdict(pass); stop; } T IMED GFT-Example

17 TTCN-3 Test Case Generation from MSCs Overview  Concept  Mapping of MSC to TTCN-3  Related Concepts  Graphical Format of TTCN-3 (GFT)  UML Testing Profile (UTP)  Comparison  Summary

18 TTCN-3 Test Case Generation from MSCs The UML 2.0 Testing Profile (UTP)  Profile: UML extension mechanism  Initiated late 2001  Make UML applicable for SW testing by enhancing UML with test concepts  Enhances reuse of design model  Adopted by OMG in June 2003 and since April 2004 standardized  Allow automated test generation with UML

19 TTCN-3 Test Case Generation from MSCs UTP Concepts Architecture concepts Behaviour concepts Data concepts Time Concepts SUTTest objectiveWildcardsTimer Test components Test caseData partitionTime zone Test suiteDefaultsCoding rules Test configuration Verdicts Test control Arbiter Utility part  UML 2.0 based meta-model

20 TTCN-3 Test Case Generation from MSCs : Slave Application : Slave BTRoaming sd BT-Roaming : Location Server > sa: Slave Application > sr: Slave BTRoaming > co: Test- Coordinator sd TestRoaming_noWarning():Verdict Master1_BT : Master BT-HW Master2_BT : Master BT-HW : Slave BT-HW > hw: Slave BT-HW > M1 : Master > M2 : Master > M3 : Master ref Connect_To_Master(M1) data ref Good_Link_Quality con_request con_accept con_confirm con_confirm(M3) data ref Bad_Link_Quality ref makeList ref roamingList(RList,Slave) roamingList(RList) > pass > Conf_Default T(6s) T > sd Conf_Default self alt * con_confirm(*) > fail > inconc

21 TTCN-3 Test Case Generation from MSCs UTP Outlook  Upcoming tool support:  IBM/Rational: Eclipse Project Hyades  Telelogic: Tau G2  Microsoft: Visual Studio  Daimler/FOKUS/Nokia/TestingTech: ITEA-Project TT-Medal

22 TTCN-3 Test Case Generation from MSCs Overview  Concept  Mapping of MSC to TTCN-3  Related Concepts  Graphical Format of TTCN-3 (GFT)  UML Testing Profile (UTP)  Comparison  Summary

23 TTCN-3 Test Case Generation from MSCs Comparison I  all three concepts were based on MSC  support of graphical test development  differ in deepness of test features  MSC  GFT  UTP

24 TTCN-3 Test Case Generation from MSCs Comparison II  Test Case Generation from MSCs  centred on test purposes  is focussed on manual, scenario testing  abstracts from details  no support of all TTCN-3 features  direct mapping to test case templates  requires less knowledge about TTCN-3  timedTTCN-3 support  GFT  MSC based representation format for TTCN-3  has to present all TTCN-3 features  timedTTCN-3 support  not desired as graphical specification language

25 TTCN-3 Test Case Generation from MSCs Comparison III  UTP  representation and specification of all aspects  independent of TTCN-3  no complete mapping to TTCN-3  enhanced testing concepts  better integration to UML  meta-model for testing  wide application area (mapping to JUnit and TTCN-3)

26 TTCN-3 Test Case Generation from MSCs Summary  MSC as powerful means for test purpose and test case specifications  MSC like presentation formats  Test case generation from MSC test purposes

Michael Ebner Institute for Informatics · University of Göttingen · Germany TTCN-3 Test Case Generation from Message Sequence Charts WITUL 2004 (IEEE Conference ISSRE)

28 TTCN-3 Test Case Generation from MSCs END

29 TTCN-3 Test Case Generation from MSCs Backup

30 TTCN-3 Test Case Generation from MSCs MSC Test Purpose Interactive Simulation Manual Specification Automatic Computation Test Purpose Specification Test Suite Production Test Case Generation State Space Exploration Direct Translation Dynamic Behaviour Constraints TTCN-2- Test Suite-Export TTCN-2- Test Suite Test Architecture Autolink - Process

31 TTCN-3 Test Case Generation from MSCs Example III – Mapping of MSC testcase NamingServiceExample() runs on Naming { Client1.call( bindingContext ) Client1.call( bind ) Client2.call( resolve ) alt { [] Client1.catch(InvalidName) { Client1.call( bind ) Client2.catch(NotFound) Client2.call( resolve ) } [else] {} } Client1.call( unbind ) } mscNamingServiceExample bindContext Client1NamingClient2 opt resolve InvalidName bind resolve unbind SUT bind NotFound

32 TTCN-3 Test Case Generation from MSCs GFT Example – timedTTCN-3 Test behaviour TTCN-3 T IMED GFT mapping T IMED Core notationPresentation format MSC Test purpose generate

33 TTCN-3 Test Case Generation from MSCs Test Purpose Example

34 TTCN-3 Test Case Generation from MSCs Generated Testcase testcase InresRTexample() runs on inres { var float sendTime1:=-1.0; var integer iterator1:=0; for (iterator1:=0; iterator1<100; iterator1:=iterator1+1) { if (sendTime1==-1.0) { sendTime1:=self.now+0.01; } else { resume(sendTime1); sendTime1:=sendTime1+0.01; } log(TimestampType:{self.now,"IDATreq1"}); ISAP.send(IDATreq:{"data"}); MSAP.receive(MDATind:{DT,number,"data"}); log(TimestampType:{self.now,"MDATind2"}); MSAP.send(MDATreq:{AK,number}); } setverdict(pass); stop; }

35 TTCN-3 Test Case Generation from MSCs : Slave Application : Slave BTRoaming Master1_BT : Master BT-HW Master2_BT : Master BT-HW : Slave BT-HW con_request con_accept con_confirm data get_link_quality quality(good) get_link_quality quality(bad) ref newMaster:= Search_NewMaster() sd BT-Roaming {0.5s..0.5s} : Location Server ref RList:= makeList (Slave) > sa: Slave Application > sr: Slave BTRoaming > co: Test- Coordinator sd TestRoaming_noWarning():Verdict Master1_BT : Master BT-HW Master2_BT : Master BT-HW : Slave BT-HW > hw: BT-HW Master1_R : Master BTRoaming Master2_R : Master BTRoaming > M1 : Master > M2 : Master connected(Slave) roamingList(RList,Slave) roamingList(RList) > M1 : Master > M2 : Master > M3 : Master Connect_To_Master(M1) Good_ Link_Quality Bad_ Link_Quality

36 TTCN-3 Test Case Generation from MSCs Use of SDL and MSC SDL-2000 MSC-2000 Interpreted as C++ etc. Product used to create used to produce Specification Ideas Customer modelled by Design Engineers Design Implementation Software Engineers modelled by made as executes as Interpreted as Tools transformed by

37 TTCN-3 Test Case Generation from MSCs ooTTCN-3 UML-based Test Specification I generate map UML TTCN-3 IDLMSC map use WSDL CORBA

38 TTCN-3 Test Case Generation from MSCs Graphical Format for TTCN-3 (GFT)  Provides a test specific profile for MSC-2000  Uses a subset of MSC-2000  Defines test specific extensions  Defines general extensions  Formerly called Test Sequence Charts (TSC)  Supports different forms to represent test cases

39 TTCN-3 Test Case Generation from MSCs UTP Methodology Wrap-Up  Test preparations  Define a test package with a test suite.  Determine SUT and import its implementation.  Determine test objectives.  Test configuration  Assign roles: SUT, test components, utility part.  Attach stereotypes.  Test cases  Group instances.  Attach stereotypes.  Define re-usable test fragments to functions.  Assign verdicts.  Specify timers.  Specify default behaviours

40 TTCN-3 Test Case Generation from MSCs Use of Inline Expressions and HMSCs  Problem  Several alternative test sequences referred to in one diagram.  Two possibilities  All alternatives are put in one test case.  For each alternative a separate test case is generated.  Strategy  Alternatives described in form of HMSCs are translated into separate test cases.  Alternatives described by inline expressions are put into the same test case.

41 TTCN-3 Test Case Generation from MSCs ToC der Dissertation 1.Introduction 2.A General Metamodel For Testing 3.Graphical Test Development (with case study)  With TTCN-3  With U2TP (UML Based Metamodel)  Relationship and Mapping Between TTCN- 3 and U2TP 4.Graphical Realtime Testing with TTCN-3 and U2TP (with case study) 5.Conclusion

42 TTCN-3 Test Case Generation from MSCs UTP Outlook  FTF submission: April 2004  Upcoming tool support:  IBM/Rational: Eclipse Project Hyades  Telelogic: Tau G2  Microsoft: Visual Studio  Daimler/FOKUS/Nokia/TestingTech: ITEA-Project TT-Medal  Automated test generation

43 TTCN-3 Test Case Generation from MSCs ToC der Dissertation 1.Introduction 2.A General Metamodel For Testing 3.Graphical Test Development (with case study)  With TTCN-3  With U2TP (UML Based Metamodel)  Relationship and Mapping Between TTCN- 3 and U2TP 4.Graphical Realtime Testing with TTCN-3 and U2TP (with case study) 5.Conclusion

44 TTCN-3 Test Case Generation from MSCs Anwendungsfälle Klassen Unified Modeling Language (UML) … Zustände Sequenzen Entwickler Integrator System- integrator Testen Einheiten- test Systemtest Integrations- test

45 TTCN-3 Test Case Generation from MSCs... und Testen Entwickler Integrator System- integrator Anwendungsfälle Klassen Zustände Sequenzen Testen Einheiten- test Systemtest Integrations- test

46 TTCN-3 Test Case Generation from MSCs

47 TTCN-3 Test Case Generation from MSCs TTCN-3 Übersicht ASN.1 Typen & Werte Andere Typen & Werte n TTCN-3 Kern- sprache TTCN-3 Benutzer Tabellarisches Format Graphisches Format Präsentations- format n IDL Typen & Werte

48 TTCN-3 Test Case Generation from MSCs MSC and TTCN (1) System specification Assessment Test results Executable test case Abstract test case Test purpose MSC MSC-based Presentation Format for TTCN-3 TTCN-3

49 TTCN-3 Test Case Generation from MSCs MSC and TTCN (2) TTCN-3 ATS 1. Generation 2. Presentation Tracing Validation Compilation MSC Simulator Compilation MSC TTCN-3 ETS

50 TTCN-3 Test Case Generation from MSCs Information in MSC Test Purposes  Descriptions of messages to be sent to and received from the SUT  Synchronization information required due to the partial order semantics of MSC  Structure information

51 TTCN-3 Test Case Generation from MSCs MSC Objectives  is a scenario language  supports complete and incomplete specifications  is a graphical language  is widely applicable  can be used throughout the engineering process  supports structured design  is often used in conjunction with other methods and languages

52 TTCN-3 Test Case Generation from MSCs The Tutorial Example  INRES - Initiator-Responder protocol  an abridged version of the Abracadabra protocol used for academic studies and illustrative purposes.  a connection-oriented, asymmetric communication protocol  a medium with uncorrupted data, loss of data, misordering

53 TTCN-3 Test Case Generation from MSCs INRES Structure InitiatorResponder Medium User ISAP1 MSAP2 ICONreq, IDATreq, IDISreq, ICONconf, IDISind MDATreq, MDATind SUT (System under Test) = Initiator and Medium

54 TTCN-3 Test Case Generation from MSCs Objectives(3) mscmi_synch1_conc1 MTC MTCTypeportISAP1type ISAP1 ? portMSAP2type MSAP2

55 TTCN-3 Test Case Generation from MSCs MSC Test Purpose Development View

56 TTCN-3 Test Case Generation from MSCs Objektorientierung für TTCN-3  Kein Objekttyp und Portinstanzen können nicht übertragen werden  Objektreferenzen in IUT nicht handhabbar  Einführung von Klassen  Erweiterung vorhandener Konzepte  Vererbung von Templates  Hierarchie von Komponenten

57 TTCN-3 Test Case Generation from MSCs Autolink - INAP CS-2 Testzweck Schnitt- stellen System Empfangs- Ereignis Sende- Ereignis Postambel Präambel

58 TTCN-3 Test Case Generation from MSCs Testing and Test Control Notation 3 (TTCN-3) –Universelle Testbeschreibungssprache –Standardisierung 2001 durch ETSI –Entwicklung eines TTCN-3-Syntaxcheckers Verbesserte Modellierung der Testumgebung –Praxis: Standard-Werte und benutzerdefinierte Signale –Ineffektive Suche, Nachbearbeitung von Testfällen –Lösung: Symbolische Ausführung –Entwicklung eines Prototypen Zusammenfassung und Ausblick Ausblick

59 TTCN-3 Test Case Generation from MSCs Ausblick TTCN-3 Beispiel

60 TTCN-3 Test Case Generation from MSCs Weitere Arbeiten Testing and Test Control Notation 3 Erweiterung der Anwendungsgebiete –Testarten: Interoperabilitätstest, Performanztests,... –Architekturen: CORBA, APIs,... Moderne, allgemeine Sprachkonzepte –C/C++-ähnliche Notation –keine OSI-spezifischen Elemente –Erweiterte Kommunikationskonzepte –Dynamische, verteilte Testarchitekturen Standardisierung 2001 durch ETSI –Entwicklung des ersten freien TTCN-3- Syntaxcheckers

61 TTCN-3 Test Case Generation from MSCs ToC der Dissertation 1.Introduction 2.A General Metamodel For Testing 3.Graphical Test Development (with case study)  With TTCN-3  With U2TP (UML Based Metamodel)  Relationship and Mapping Between TTCN- 3 and U2TP 4.Graphical Realtime Testing with TTCN-3 and U2TP (with case study) 5.Conclusion

62 TTCN-3 Test Case Generation from MSCs MSC SDL/ MSC TTCN How to Test? System implementation System specification Assessment evaluate Test results execute Executable test case implement Abstract test case specify Test purpose identify

63 TTCN-3 Test Case Generation from MSCs MSC and TTCN (1) System specification Assessment Test results Executable test case Abstract test case Test purpose MSC MSC-based Presentation Format for TTCN-3 TTCN-3

64 TTCN-3 Test Case Generation from MSCs MSC and TTCN (2) TTCN-3 ATS 1. Generation 2. Presentation Tracing Validation Compilation MSC Simulator Compilation MSC TTCN-3 ETS

65 TTCN-3 Test Case Generation from MSCs Basic MSC in a Nutshell MSC diagram MSC heading Condition Output event Input event Instance Instance end mscINRES_Example1 ICONreq ICONconf User Idle Connected ISAP1 MDATind MDATreq Message to the environment

66 TTCN-3 Test Case Generation from MSCs call opti ob1:C1 ob3:C3 ob2:C2 ob4:C4 call foo(x) call bar(x) call doit(z) call doit(w) call more alt msc example(x: integer ) doit(z) foo(x) doit(w) bar(x) opti more when x>0 when x<=0 Method Calls Method call at a gate Reply at a gate Suspension area Method area Call on suspension

67 TTCN-3 Test Case Generation from MSCs HMSC Start MSC Reference Condition Alternative Loop Connection Point Connecting mscINRES_Behaviour Idle Connected DataTransfer Disconnecting Connected

68 TTCN-3 Test Case Generation from MSCs New challenges for TTCN (1)  Corba and Internet Testing  Dynamic configurations  Addressing entities inside the SUT  Synchronous communication  Real-time- and performance- Testing  Handling of load generators  Possibility to repeat test runs  New and improved design techniques  Smooth interworking with SDL'2000, MSC'2000, ASN.1'99, UML and IDL  Adaptation to different application areas

69 TTCN-3 Test Case Generation from MSCs New challenges for TTCN (2)  Module and Group concept  „New “ data types  Synchronous communication  Less OSI concepts and terms  Introduction of templates  Textual base

70 TTCN-3 Test Case Generation from MSCs System Under Test (SUT) Real Test System Interface Abstract Test System Interface MTCPTC Test systemConnected Ports IN OUT Mapped Ports TTCN-3 Test Architecture (2)

71 TTCN-3 Test Case Generation from MSCs TTCN-3 Example function internetUser () runs on InternetType { timer Tvisit; var integer orderNr; var PizzaDeliveryType thePizza; activate(StandardDefault, InternetDefault); Tvisit.start(OverallDuration); P2.call(StandardINetOrder, maxConnectTime) { [] P2.getreply (INetOrder:* value *) -> value orderNr { verdict.set(pass) } [] P2.catch (INetOrder, reasonType : *) { verdict.set(fail) } [] P2.catch (timeout) { verdict.set(inconc) } }

72 TTCN-3 Test Case Generation from MSCs The Development of MSC dialects of sequence charts before 1992 instances, messages, events, conditions MSC-92 HMSC, references, general ordering, inline expressions MSC-96 object orientation, data, time, method calls MSC-2000

73 TTCN-3 Test Case Generation from MSCs Object Orientation  MSC documents define instance kinds  instance kinds are types suited for object orientation  Inheritance  inheritance of instance kinds means inheriting all contained instances and MSCs  Virtuality  Virtual MSCs means that MSCs may be redefined in specialized instance kinds  Close correspondance with object orientation in SDL and other object-oriented languages such as Java

74 TTCN-3 Test Case Generation from MSCs Data in MSC-2000  MSC has no data language of its own!  MSC can make use of data languages such that  fragments of your favorite (data) language can be used (C, C++, SDL, Java, TTCN-3,... )  MSC can be parsed without knowing the details of the chosen data language  the data language strings have no unnecessary extra delimiters  Mappings to data languages have not yet been made  up to any user  could be standardized in the future

75 TTCN-3 Test Case Generation from MSCs Use of Data InitiatorResponder MDATreq(DT(isdu,seq_no)=:dt) MDATreq(no:=ACK(rec_no)) msc Transmission (isdu: ISDUType; seq_no, try: Integer); Check_Data(rec_dt) seq_no:= 1-seq_no  Static variables have MSCs as homes (cannot change binding within the MSC)  Binding  Left-hand or right-hand  in actions  with messages  with MSC references Medium MDATind(dt=: rec_dt) MDATind(rec_no:=ACK(rec_no)) when (seq_no != rec_no) and (try <4) Transmission (isdu,seq_no,try+1)

76 TTCN-3 Test Case Generation from MSCs Method Calls  Method Calls  Blocking (with reply)  Non-Blocking  Method calls can be super-imposed  Used to describe the control flow between instances

77 TTCN-3 Test Case Generation from MSCs Summary & Outlook (2)  MSC as powerful means for test purpose and test case specifications  in particular, extensions of MSC-2000 such as data support and method calls are used  Test case generation from MSC test purposes  direct mapping to test case templates  MSC like presentation format for TTCN- 3

78 TTCN-3 Test Case Generation from MSCs Enjoy your lunch and have a nice trip home!

79 TTCN-3 Test Case Generation from MSCs The UML 2.0 Testing Profile  Profile: UML extension mechanism  Initiated late 2001  Make UML applicable for SW testing  Adopted by OMG in June 2003  At time it is revised by the Finalization Task Force (FTF)

80 TTCN-3 Test Case Generation from MSCs Outlook  FTF submission: April 2004  Upcoming tool support:  IBM/Rational: Eclipse Project Hyades  Telelogic: Tau G2  Microsoft: Visual Studio  Daimler/FOKUS/Nokia/TestingTech: ITEA-Project TT-Medal  Automated test generation

81 TTCN-3 Test Case Generation from MSCs Outline & Introduction Test behaviour TTCN-3GFT mapping T IMED Core notationPresentation format Presented at Testcom 2002 (Submitted for standardisation.) MSC Test purpose generate T IMED GFT mapping 1.Instrument functional testcases to generate timestamps, 2.Execute testcase, 3.Apply evaluation functions to the generated timestamps, 4.Assign a test verdict. MSC Test purpose generate T IMED GFT mapping

82 TTCN-3 Test Case Generation from MSCs T IMED TTCN-3=TTCN-3+Time Extensions 1.Local clock –read ( self.now ), wait ( resume ) 2.Logfile –log, sort, retrieve of structured data 3.Timezones –specification of clock synchronised test components 4.Conf-Verdict –pass  conf  inconc  fail

83 TTCN-3 Test Case Generation from MSCs Test Case Generation Test behaviour TTCN-3 T IMED GFT mapping T IMED 1.Using MSC as test purpose: MSC instances represent SUT and TTCN ports. MSC messages depict TTCN send/receive. 2.Generating corresponding TTCN test cases. Core notationPresentation format MSC Test purpose generate

84 TTCN-3 Test Case Generation from MSCs Generating T IMED TTCN-3 from MSC  Pure functional test cases: Proven approach and implemented by TTCN-2 tools, e.g.:  Autolink (Telelogic)  ptk (Motorola)  New: generating T IMED TTCN-3 test cases.  MSC allows to attach time constraints to events:  Absolute time constraints,  Relative time constraints,  Time measurements.

85 TTCN-3 Test Case Generation from MSCs Test Purpose Example

86 TTCN-3 Test Case Generation from MSCs Generated Testcase testcase InresRTexample() runs on inres { var float sendTime1:=-1.0; var integer iterator1:=0; for (iterator1:=0; iterator1<100; iterator1:=iterator1+1) { if (sendTime1==-1.0) { sendTime1:=self.now+0.01; } else { resume(sendTime1); sendTime1:=sendTime1+0.01; } log(TimestampType:{self.now,"IDATreq1"}); ISAP.send(IDATreq:{"data"}); MSAP.receive(MDATind:{DT,number,"data"}); log(TimestampType:{self.now,"MDATind2"}); MSAP.send(MDATreq:{AK,number}); } setverdict(pass); stop; }

87 TTCN-3 Test Case Generation from MSCs Graphical Test Case Specification Test behaviour TTCN-3GFT mapping T IMED 1.New GFT symbols. 2.One-to-one mapping between T IMED TTCN-3 core notation and T IMED GFT. Core notationPresentation format MSC Test purpose generate T IMED GFT mapping

88 TTCN-3 Test Case Generation from MSCs T IMED GFT-Example testcase InresRTexample() runs on inres{ var float sendTime1:=-1.0; var integer iterator1:=0; for (iterator1:=0; iterator1<100; iterator1:=iterator1+1) { if (sendTime1==-1.0) { sendTime1:=self.now+0.01; } else { resume(sendTime1); sendTime1:=sendTime1+0.01; } log(TimestampType:{self.now,"IDATreq1"}); ISAP.send(IDATreq:{"data"}); MSAP.receive(MDATind:{DT,number,"data"}); log(TimestampType:{self.now,"MDATind2"}); MSAP.send(MDATreq:{AK,number}); } setverdict(pass); stop; }

89 TTCN-3 Test Case Generation from MSCs T IMED GFT  Overview: New GFT symbols and mapping T IMED TTCN-3  T IMED GFT: T IMED TTCN-3 T IMED GFT

90 TTCN-3 Test Case Generation from MSCs T IMED GFT (continued) T IMED TTCN-3 T IMED GFT