260 likes | 414 Views
Using TTCN-3 in Interoperability Testing for Real-time Communication Systems. (Testcom 2006). Zhiliang Wang, Jianping Wu, Xia Yin, Xingang Shi and Beihang Tian Department of Computer Science and Technology Tsinghua University http://netlab.cs.tsinghua.edu.cn. Outline.
E N D
Using TTCN-3 in Interoperability Testing for Real-time Communication Systems (Testcom 2006) Zhiliang Wang, Jianping Wu, Xia Yin, Xingang Shi and Beihang Tian Department of Computer Science and Technology Tsinghua University http://netlab.cs.tsinghua.edu.cn
Outline • Background and Motivation • Model of SUT • Test Behavior Tree • Test case transformation • TimedTTCN-3 • Real-time TTCN • Comparisons • Conclusion and Future work
Background: Protocol Testing • Conformance testing • Basic method of protocol testing • Test whether an implementation conforms to its protocol specification • Test a single protocol entity • Interoperability testing • Complement of conformance testing • Test whether two or more protocol implementations can communicate with each other correctly and inter-operate as a whole system to perform functions specified in protocol specifications • Test a system of two or more protocol entities • Time constraints are important factors in protocols • Model: real-time systems • Interoperability testing of real-time communication systems
Background: Interoperability Testing Test Notations Test Process
Motivation System Specification Test Generation Test Behavior Tree TimedTTCN-3 Real-time TTCN Extend Extended Real-time TTCN Test Notations
Outline • Background and Motivation • Model of SUT • Test Behavior Tree • Test case transformation • TimedTTCN-3 • Real-time TTCN • Comparisons • Conclusion and Future work
Model of SUT • Communicating Multi-port I/O Automata: CMpTIOA • Set of Protocol entities: MpTIOA • Communication channels between protocol entities 1. Introduce a clock set 2. Transition: (a) Associated with a time constraint (b) Reset clock set Transition: l -- Initial location l’-- Destination location a -- Action P -- Time Constrains R – Reset Clock set !a ?a a Mi Mj Cij
A Simple Real-Time Communication Protocol Input Complete 1. Initiate a connection to a remote entity actively 2. Respond a connection request from a remote entity passively
Outline • Background and Motivation • Model of SUT • Test Behavior Tree • Test case transformation • TimedTTCN-3 • Real-time TTCN • Comparisons • Conclusion and Future work
Test Behavior Tree From the view of SUT Parameters: 1. Controllable: d0 2. Uncontrollable: d1,d2,d3
Test Behavior Tree • Test architecture • Test behavior tree • From the view of test system Lemma 1. On the time point Tk, time constraints of the test event nodes can be represented by a conjunction over a set of linear inequalities on di(i=0,1,…,k-1).
Outline • Background and Motivation • Model of SUT • Test Behavior Tree • Test case transformation • TimedTTCN-3 • Real-time TTCN • Comparisons • Conclusion and Future work
TTCN-3 • Real-time extension of TTCN-3 • Introduce a new verdict conf • functionalpass but no-functionalfail • Introduce the concept of absolute time • Retrieving the current local time: self.now • Delaying the execution of a test component: resume() • Extend the TTCN-3 logging mechanism • Support both online and offline evaluation
TTCN-3 • Transformation to TTCN-3 Codes • Not considering time constraints • Tree Structure TTCN-3 codes • Pre-order traversing method • Considering time constraints Transformation rules from test behavior trees to TIMEDTTCN-3 test cases Rule 1 Get global time values of nodes in the test behavior tree: Self.now Rule2 Get the real values of uncontrollable parameters: Expression and Assignment Rule3 Implementation of controllable parameters: resume() function Rule4Online evaluations and verdicts setting:setverdict() function
Real-time TTCN • Real-time extension of TTCN Time Options Column Time Column
Real-time TTCN • Transformation from test behavior tree to Real-time TTCN test case • Not considering time constraints: Pre-order traversing method • Calculation of time constraints: EET and LET Case 1:Node(3) PO?c, d2[d2<3] EET(3) = 0,LET(3) = 3 Case 2:Node(7) PCO2?B1, d3[2<d1+d2+d3<3] EET(7) = L1+2,LET(7) = L1+3 Case 3:Node(2) PO?b, d2[1<d2<3 and d1+d2≥2] L1 Real-time TTCN cannot specify this time constraint Need Extend Real-time TTCN!
Extended Real-time TTCN(1) • Extensions on the syntactical level • Introduce a timestamp recording function T( ): for a lable L, T(L) returns the absolute time value of the execution time for the statement labeled as L • Method for specifying EET and LET: in the expressions of EET and LET, function T( ), max( ) and min( ) can be used • Node(2) PO?b, d2[1<d2<3 and d1+d2≥2] • d2[1<d2<3 and d1+d2≥2] • max(2-T2+T1,1)<d2<3 • EET(2)= max(2-T(L2)+T(L1),1) LET(2)=3 L1 T(L1) L2 T(L2) Proposition. In real-time interoperability testing, all time constraints of each node in test behavior trees can be represented as EET and LET by the above syntactical extensions. Proof
Extended Real-time TTCN(2) • Extensions of operational semantics • Snapshot operational semantics If 0 ≤ EET ≤ LET is not satisfied, should not consider this statement in test execution Send statement: choose a SendTimei Step 1: Calculate EET and LET In the check of one round,time value remains unchanged Step 2: Execute snapshot A1[eexp1, lexp1] A2[eexp2, lexp2] ...... An[eexpn, lexpn] Send statement: if current time is SendTimei,then execute it Step 3: Evaluations of this level Step 4: Check time constraints Step 5: Execute the match alternative
TTCN-3 vs. Real-time TTCN • Capabilities of specifying time constraints • TimedTTCN-3 is more powerful than Real-time TTCN • Flexibility • TimedTTCN-3 is more flexible: like common programming languages • Real-time TTCN: more compact and formal • Semantics • TimedTTCN-3:more straightforward and simple • Real-time TTCN: more complicated • applicability • TimedTTCN-3: real-time testing and performance testing • Real-time TTCN: only real-time testing
Outline • Background and Motivation • Model of SUT • Test Behavior Tree • Test case transformation • TimedTTCN-3 • Real-time TTCN • Comparisons • Conclusion and Future work
Conclusion and Future work • Study test notations in real-time interoperability testing • Investigate the two test notations • TimedTTCN-3 • real-time TTCN • TimedTTCN-3 is more powerful and flexible than real-time TTCN and can be more suitable for real-time interoperability testing. • Future work • study real-time interoperability testing under distributed test architecture • use the TimedTTCN-3 based test system in real-life timed interoperability testing
Thank you!If you have any questions, please send email to:wzl@csnet1.cs.tsinghua.edu.cn
Pre-order traversing method PCO1!A1 PO?a PO?b PCO1?B1 PCO1?B1 PCO1?otherwise PO?b PCO1?C1 PCO1?C1 PCO1?otherwise PO?c PCO1?C1 PCO1?C1 PCO1?otherwise PO?b PO?c PO?otherwise PO?a PO?otherwise
Proposition 1. In real-time interoperability testing, all time constraints of each node in test behavior trees can be represented as EET and LET by the above syntactical extensions.