130 likes | 241 Views
Communication Patterns for Expressing Real-Time Requirements Using MSC and their Application to Testing. Helmut Neukirchen 1 Zhen Ru Dai 2 Jens Grabowski 1. 1 Institute for Informatics, University of Göttingen, Germany 2 Fraunhofer FOKUS, Competence Center TIP, Germany. Outline.
E N D
Communication Patterns for Expressing Real-Time Requirements Using MSC and their Application to Testing Helmut Neukirchen1 Zhen Ru Dai2 Jens Grabowski1 1 Institute for Informatics,University of Göttingen, Germany 2 Fraunhofer FOKUS, Competence Center TIP, Germany
Outline • What are Patterns? • Real-Time Communication Patterns • Application to Testing • Summary and Outlook
1. What are Patterns? • Patterns provide generic, proven solutionsfor problems recurring in a certain context. • Elements of re-usability & common vocabulary. • Solutions themselves are not new. • Idea of patterns is not new. • But: pattern support for testing is weak. • This presentation: Real-Time Communication Patterns
2. Real-Time Communication Patterns (RTC-Patterns) • Motivation: Work on TIMEDTTCN-3 (TestCom ’02 & ’03) • How to specify, test & evaluate real-time requirements? • MSC as real-time test purpose: • Specify real-time requirements based on patterns. • Map patterns from MSC to TIMEDTTCN-3. • RTC-pattern catalogue: • Delays: • Latency • Response Time • Looped Communication: • Throughput • Periodicity and Jitter
RTC-Pattern Description • Context and solution described using MSC: • Describe context based on: • Instances involved, • Message flow. • Describe solution by attaching MSC time constraints to messages of context. • Pattern abstraction and instantiation makes especially use of MSC concepts: • Decomposed, • Reference.
Context: Two PCOs involved Example: Latency Pattern Context: SUT Abstraction: Decomposed instance Context: First event: stimulus Solution: Time constraint between first and last event Abstraction:Reference Context: Last event: response
Pattern catalogue Test purpose MSC compose map Test case TIMEDTTCN-3 Test purpose Pattern catalogue MSC identify map 3. Application to Testing • TIMEDTTCN-3code can be relatedto RTC-patterns: • Unifies generation & evaluation of timestamps. • Generate timestamps during test run, • Evaluate timestamps on-line or off-line.
Library module EvaluationFunctionModule() {function evalLatencyOnline(float sendTime,float receiveTime,float lowerbound,float upperbound)returnverdicttype{ varfloat timeDiff;timeDiff:=receiveTime-sendTime;if ((lowerbound<timeDiff)and(timeDiff<upperbound)){returnpass; }else { returnconf; }} Relating TIMEDTTCN-3 to RTC-Pattern import from EvaluationFunctionModuleall; var float timeA, timeB;. . .timeA := self.now;PCO1.send(m1); furtherEvents(); PCO2.receive(m1); timeB := self.now; setverdict(evalLatencyOnline (timeA,timeB,t1,t2));
RTC-Pattern Instantiation • Pattern: abstract solution. • Pattern instantiation: • Resolve abstraction mechanisms. • Replace placeholders. • Example: Inres protocol • Instantiation of Latency pattern.
Latency Pattern Inres Test Purpose
Latency Pattern Resulting TIMEDTTCN-3 Test Case module InresRTexampleModule() { import from EvaluationFunctionModuleall; testcase InresRTexample() runs on inres {var float timeBegin, timeEnd; ConnectionEstablishment(); timeBegin := self.now; ISAP.send(IDATreq:{data}); MSAP.receive(MDATind:{DT,number,data}); timeEnd := self.now;setverdict(evalLatencyOnline(timeBegin,timeEnd,0.001,0.005)); MSAP.send(MDATreq:{AK,number});ConnectionRelease(); setverdict(pass); stop;} }
4. Summary and Outlook • RTC-patterns have been presented: • Test purpose & test case development and test evaluation unified and simplified. • Patterns not only for MSC & TIMEDTTCN-3, but for the whole test domain in general. • ETSI work item “Patterns in Test Development” (PTD) just started.
Thank you for your attention! • Any questions?