Download presentation
Presentation is loading. Please wait.
Published byPhilippa Foster Modified over 9 years ago
1
Michael Ebner Institute for Informatics · University of Göttingen · Germany TTCN-3 Test Case Generation from Message Sequence Charts ISSRE2004 - WITUL
2
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
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
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
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
6 TTCN-3 Test Case Generation from MSCs MSC Test Purpose Description
7
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
27
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
28 TTCN-3 Test Case Generation from MSCs END
29
29 TTCN-3 Test Case Generation from MSCs Backup
30
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
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
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
33 TTCN-3 Test Case Generation from MSCs Test Purpose Example
34
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
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
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
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
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
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
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
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
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
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
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
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
46 TTCN-3 Test Case Generation from MSCs
47
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
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
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- 2000 TTCN-3 ETS
50
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
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
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
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
54 TTCN-3 Test Case Generation from MSCs Objectives(3) mscmi_synch1_conc1 MTC MTCTypeportISAP1type ISAP1 ? portMSAP2type MSAP2
55
55 TTCN-3 Test Case Generation from MSCs MSC Test Purpose Development View
56
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
57 TTCN-3 Test Case Generation from MSCs Autolink - INAP CS-2 Testzweck Schnitt- stellen System Empfangs- Ereignis Sende- Ereignis Postambel Präambel
58
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
59 TTCN-3 Test Case Generation from MSCs Ausblick TTCN-3 Beispiel
60
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
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
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
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
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- 2000 TTCN-3 ETS
65
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
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
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
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
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
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
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
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
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
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
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
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
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
78 TTCN-3 Test Case Generation from MSCs Enjoy your lunch and have a nice trip home!
79
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
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
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
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
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
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
85 TTCN-3 Test Case Generation from MSCs Test Purpose Example
86
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
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
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
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
90 TTCN-3 Test Case Generation from MSCs T IMED GFT (continued) T IMED TTCN-3 T IMED GFT
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.