Using TTCN-3 in Interoperability Testing for Real-time Communication Systems Zhiliang Wang, Jianping Wu, Xia Yin, Xingang Shi and Beihang Tian Department of Computer Science and Technology Tsinghua University (Testcom 2006)
2 Outline Background and Motivation Model of SUT Test Behavior Tree Test case transformation –TimedTTCN-3 –Real-time TTCN –Comparisons Conclusion and Future work
3 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
4 Background: Interoperability Testing Test Process Test Notations
5 Motivation System Specification Test Generation Test Behavior Tree Real-time TTCNTimedTTCN-3 Extend Extended Real-time TTCN Test Notations
6 Outline Background and Motivation Model of SUT Test Behavior Tree Test case transformation –TimedTTCN-3 –Real-time TTCN –Comparisons Conclusion and Future work
7 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 MjMj MiMi C ij a !a ?a Transition : l -- Initial location l ’ -- Destination location a -- Action P -- Time Constrains R – Reset Clock set
8 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
9 Outline Background and Motivation Model of SUT Test Behavior Tree Test case transformation –TimedTTCN-3 –Real-time TTCN –Comparisons Conclusion and Future work
10 Test Behavior Tree From the view of SUT Parameters: 1. Controllable: d 0 2. Uncontrollable: d 1,d 2,d 3
11 Test Behavior Tree Test architecture Test behavior tree –From the view of test system Lemma 1. On the time point T k, time constraints of the test event nodes can be represented by a conjunction over a set of linear inequalities on d i (i=0,1,…,k-1).
12 Outline Background and Motivation Model of SUT Test Behavior Tree Test case transformation –TimedTTCN-3 –Real-time TTCN –Comparisons Conclusion and Future work
13 TTCN-3 Real-time extension of TTCN-3 Introduce a new verdict conf –functional pass but no-functional fail 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
14 Transformation to TTCN-3 Codes –Not considering time constraints Tree Structure TTCN-3 codes Pre-order traversing method –Considering time constraints Rule 1 Get global time values of nodes in the test behavior tree: Self.now Rule 2 Get the real values of uncontrollable parameters: Expression and Assignment Rule 3 Implementation of controllable parameters: resume() function Rule 4 Online evaluations and verdicts setting: setverdict() function TTCN-3 Transformation rules from test behavior trees to TIMEDTTCN-3 test cases
15 TTCN-3
16 Real-time TTCN Real-time extension of TTCN Time Column Time Options Column
17 Real-time TTCN Transformation from test behavior tree to Real-time TTCN test case –Not considering time constraints: Pre-order traversing methodPre-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 !
18 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 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 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 T(L1) T(L2) L1 L2
19 Extended Real-time TTCN(2)
20 Extended Real-time TTCN(2) Extensions of operational semantics –Snapshot operational semantics A 1 [eexp 1, lexp 1 ] A 2 [eexp 2, lexp 2 ] A n [eexp n, lexp n ] Step 1: Calculate EET and LET If 0 ≤ EET ≤ LET is not satisfied, should not consider this statement in test execution Send statement: choose a SendTime i Step 2: Execute snapshot In the check of one round, time value remains unchanged Step 3: Evaluations of this level Step 4: Check time constraints Step 5: Execute the match alternative Send statement: if current time is SendTime i , then execute it
21 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
22 Outline Background and Motivation Model of SUT Test Behavior Tree Test case transformation –TimedTTCN-3 –Real-time TTCN –Comparisons Conclusion and Future work
23 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 to:
25 Pre-order traversing method PCO1!A1 PO?a PO?b PCO1?B1 PCO1?otherwise PO?b PCO1?C1 PCO1?otherwise PO?c PCO1?C1 PCO1?otherwise PO?b PO?c PO?otherwise PO?a PO?otherwise
26 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.