Title: ????????? Network Performance Evaluation and Testing
1?????????Network Performance Evaluation and
Testing
- ??? ???
- Sichuan Network Communication Key Technology
Laboratory - xyzhang_at_swjtu.edu.cn
- 87601745-604
2?7????????????
- 7.1 ????????(TTCN/Tcl/Ruby/Java)
- 7.2 TTCN??
- 7.3 TTCN-3?????
- 7.4 TCL
37.1 ????????
???????????????????????????,????????????????
?????(??)? ???????????????????? 1)
??????????????ISO/IEC9646-3?TTCN (Tree and Table
Combined Notation)???????????(ETSI)????2001?6?????
3?TTCN,?TTCN-3 (Testing and Test Control Notation
Version 3)? 2) ????????????Tcl,Ruby???????
3) JAVA???????
41?TTCN
????,??????????????????????,?????????????????
?? ISO9496???????????????--TTCN,????????????,
??????????,??????????????,???????????TTCN????????
?(TTCN.GR)????????(TTCN.MP)?TTCN.GR?????????,????,
??????,?????TTCN.MP???????BNF????
TTCN-3??TTCN?????????,?????,????????????????????
52?TCL/Expect/Tk
1) TCL (Tool Command Language)????????????,
?????????????????????????TCL???????????????????
TCL??????C\C??????,????TCL????C?,?????????
?TCL???C\C?????,?????C\C???????TCL,???????????
TCL????????????????TCL??????????,??????????????,??
?????????,TCL?????????/?????????/?????????????TCL?
???TCL?????????,?????????TCL???????/?????
6 ???TCL?????????,????????????????????????????
??????,???????????????????????????
TCL??????????????????????????????????????????????,
?????????????TCL?????,???????????????,???????????
???TCL???,?????????,???????????????
7 ??,??TCL????C\C?????????????,??TCL?????????
??????,???????C\C??????????????????,????????????
????????TCL?????????,??????,?????????????TCL??????
?,????????? TCL?????????????????
8 2) Expect ????????????,????????????????,???
?????Expect???Don Libes?1990?????Expect??Expect???
???Expect??????????????????(Expect is a
software suite for automating interactive
tools)? ?????????????????????????????,???????
???????(terminal)????,?????? ?????????????Expect??
????????,?????????????????????????,?????????BBS???
???
9 ???????,Expect?????,????????,????????????????
?? Expect??Tcl???????,???????Expect??????Tcl?
3) Tk (Tool Kit) ???Tcl??????????,?Tcl??
??????Tk????C/C??????????????,????????????
Windows ????
10?7-1 ??????
C Tcl/Tk Java
?????? ? ? C?? ?
?????? ??, ???????????? ???????????? ???????????????Byte Code, ???????
????????,?grep?? ??50????? ??10????? ????40?????
???????? 200MB HD,32MB Memory 3MB HD,4MB Memory 20MB HD,4MB Memory
?????? ? ?? ??
???? ?? ??? ?
???? ??,??? ???? ?????,??????????????
113?Ruby
Ruby????????????,?Python?Perl?Smalltalk?3???
??????,????,??????????,???????,???????????????Ru
by???????,????????????? (Matsumoto Yukihiro)?
?????1993?????Ruby???????,??????????????
??Ruby?????????,????????????????????
12 Ruby?????????? 1)????????
?Ruby?,?????????????????????Ruby????????
?Java?,?????????????? int c Math.abs(-20)
??Ruby???,??????,????-20?????????,?????????
?Ruby??????? c -20.abs ?
13 2)??????? Ruby????????,????????????????
???????,????????????????,?????Ruby???,Ruby????????
????????,???Perl???????????????????,?Ruby?????????
???,Ruby???????Ruby????????????????????,??????????
?????,???????????????????
14 3)???? (1)????,????????????,????????????????
(2)????????? (3)?????? (4)???????
(5)????,??????????Ruby???
15 4)??Ruby?????Watir
Watir???Ruby??????????,?????Web Application
Testing in Ruby???????????Watir??????,??????????Wa
tir????????,???????????????,??html?JavaScript???Wa
tir????IE?????,??????????????Firefox?Safari???????
?Watir????,Watir?????????????????????????
164?Java
1)???????????? 2)??????? 3)????????????????
? Jtest?parasoft???????Java?????????,????Java?????
?????? ? Jmeter?Apache?????????,??????????
? Junit???java??????,?Xunit???????
17?
2010?10?TIOBE????????????
18(No Transcript)
19????????5??10??15???????
20Position Programming Language Ratings Position Programming Language Ratings
21 NXT-G 0.616 36 Scratch 0.361
22 PowerShell 0.615 37 R 0.360
23 PL/SQL 0.605 38 Visual Basic .NET 0.325
24 Lua 0.556 39 CL (OS/400) 0.324
25 ABAP 0.552 40 Haskell 0.318
26 Scheme 0.523 41 cT 0.311
27 Fortran 0.463 42 JavaFX Script 0.307
28 Object Pascal 0.453 43 Prolog 0.288
29 Alice 0.448 44 APL 0.276
30 LoGo 0.417 45 IDL 0.269
31 C shell 0.410 46 Forth 0.268
32 Tcl (??50?) 0.399 47 JScript.NET 0.266
33 D 0.399 48 Smalltalk 0.246
34 COBOL 0.383 49 Scala 0.239
35 ActionScript 0.365 50 ML 0.230
217.2 TTCN??
- ??????????,TTCN?????????(Test
Suite)???????TTCN??????? - 1??????(Suite Overview)?
- 2?????(Declaration Part)?
- 3?????(Constraint Part)
- 4?????(Dynamic Part)?
221?????? (Suite Overview)
- ?????????????????????????????????,???????????
??????? - ?????
- ???????????
- ???????????????????(PICS)????????????(PIXIT)
- ??PICS?PIXIT?????????????
- ????????????
- ????????????????????????
232?????(Declaration Part)
- ?????????????????????????????????????????????
?? - ??????????????
- ??????????
- PCO???
- ASP?????ASP??????ASP??????
- PDU?????PDU??(?)???PDU??????
- ???????
- ????????????
24 ?7-2?ISO??????????PCO????(PCO type in
TTCN.GR form),??PCO???TSAP?NSAP,TSAP?UT
?IUT???,NSAP?LT?IUT???? ?7-2 PCO????
Name Type Role Comments
L NSAP LT NSAP as LT
U TSAP UT TSAP as UT
253????? (Constraint Part)
????????????????ASP????PDU?????????????????
?,?????????UT?LT?IUT??ASP?PDU?,??????ASP????PDU
???????UT?LT?IUT??ASP?PDU?,??????????ASP????PDU
??????????
26- ???????????????????????????????????????????
???????????????? - ????,?????????????,???????????
- - ????ASP???PDU??
- ? ??????,????????????,???????
- ????????????
27 ?7-3???ISO????????????????(?????????),PDU???
???????????? ?7-3 PDU????
PDU NameT_CONNECTI Constraint NameTCON_1
Field Name Value
Source 1000B
Destination ?
T_Class 0
User Data ?
284?????(Dynamic Part)
?????????????,???????????????(Default
Steps)??????,?????????????BNF??????,????????????
?TTCN???,??????????????TTCN???TTCN????????????
????????????????????,?????????????????????????????
?Send???!?????????????????Receive????????????
????????Send?Receive????????????????PCO????
29 TTCN???????????????????????(START,
STOP????)??????TTCN????????????
?7-4???????????????????IUT??????????????????
????LOOP?GO TO (?)????????xlt5?LOOP??,???x????5
?,?????LOOP??
30?7-4 ??????
Test Case Dynamic Behavior Test Case Dynamic Behavior Test Case Dynamic Behavior Test Case Dynamic Behavior Test Case Dynamic Behavior
Reference TTCN_EXAMPLE/TREE_EXAMPLE-1 Identifier TREE_EX_1 Purpose To illustrate the use of tree Default Reference TTCN_EXAMPLE/TREE_EXAMPLE-1 Identifier TREE_EX_1 Purpose To illustrate the use of tree Default Reference TTCN_EXAMPLE/TREE_EXAMPLE-1 Identifier TREE_EX_1 Purpose To illustrate the use of tree Default Reference TTCN_EXAMPLE/TREE_EXAMPLE-1 Identifier TREE_EX_1 Purpose To illustrate the use of tree Default Reference TTCN_EXAMPLE/TREE_EXAMPLE-1 Identifier TREE_EX_1 Purpose To illustrate the use of tree Default
Behavior Description Label Constraint Reference Verdict Comments
L!CONNECTreq L?CONNECTconf L!DATAreq L?DATAind xlt5?loop L!DISCreq L?DISCind L?DISCind loop CR1 CC1 DTR1 DTI1 DSCR1 DSCI1 DSCI1 pass inconc fail request.. ..confirm send data rev.data repeat
317.3 TTCN-3?????
- 7.3.1 What is TTCN-3?
- Testing and Test Control Notation Version 3
- Internationally standardized testing
language,Product of the ETSI Technical Committee
MTS (Methods for Testing and Specification) - A programming language that has been used for
more than 15 years in standardization as well as
industry - Specifically designed for black box testing and
certification - Constantly developed and maintained at ETSI by a
team of leading testing experts from industry,
institutes, and academia?
32What is TTCN-3?
- A testing technology that applies to a variety
of application domains and types of testing - Knowledge of TTCN-3 is valuable both for
employees as well as employers due to its wide
applicability - Offers potential for reducing training and test
maintenance costs significantly - Proven to work in very large and complex
industrial tests, e.g., 3G network elements
33Application Range of TTCN-3
TTCN-3??????????????????????????????????????
(????????????)?????(??????)???????????APIs??CORBA?
?? TTCN-3????????????,???????????,???????(Int
eroperability Testing)?????(Performance
Testing)??????(Robustness Testing)?????(Regression
Testing)????????(Integration and System
Testing)? TTCN-3??????????
34Expansion of TTCN-3 Use
357.3.2 TTCN-3????
TTCN-3?TTCN?????,?TTCN-3????????????????,??????
TTCN????????????????????? 1?TTCN-3?????
TTCN-3??????????????????,???????????????,?????????
??????? TTCN-3??????????????,?????(Core
Language)?????(Graphical Format)?????(Tabular
Format),???????????????
36 ?????TTCN-3??????????,???????,???TTCN??????????
???,??????????????????????????????,???????????????
??????????????????????????????
?1/2,TTCN-3???????????????????????????????????????
? ??????????????(?3)?
37The Core Languageand Other Presentation Formats
(Fig 1)
38Use of TTCN-3 With Other Languages (Fig 2)
- TTCN can be integrated with types systems of
other languages - Fully harmonized with ASN.1 (1997)
- Harmonized with other languagesIDL, XML,
C/C,etc.
TTCN-3 Core Language
Other types Valuesn
39?3 ??????????????
402?TTCN-3???
TTCN-3????????????????????,?????????????????????
????????????? ?6-1????????????
?????????????????????
41?7-1 ??????
module MyTestSuite //????
const integer MyConstant 1 type record
MyMessage template MyMessage
.. function MyFunction1()
function MyFunction2() ..
testcase MyTestCase1 testcase
MyTestCase2 testcase MyTestCase3
.. control
//???? var Boolean My Variable
true .. MyTestCase1
MyTestCase2 If (My Variable)
MyTestCase3 ..
421)TTCN-3???????
??????????????????,?????????????????????????
?????????????????????????????????????????????,????
??? ??????????????,?????TTCN-3??????????,???
??????????????????????????????????????????????impo
rt???TTCN-3?????export??,??,??????????????????????
43??7-2??,???????????,???????????? ?7-2 import
type MyType from MyModuleA
//?????? import all from MyModuleB
//?????? import group MyGroup from
MyModuleC //????? import all from MyModuleD
//????????
442)TTCN-3???????
TTCN-3????????????C???main????????????TTCN-3??????
???? ?????,???????????????,?????if-else,do-while??
???????????????TTCN-3??????????7-4?? ?????????????
,?????????????????????TTCN-3???????????,??????????
????????
45? ?????? ? ?????? ? ?????? ? ??????
? ? ?????? ??? ?????? ?? ??????? ???
??? () Yes Yes
?? Yes Yes
?????? if() else Yes Yes
For?? for() Yes Yes
While?? while() Yes Yes
Do?? do while() Yes Yes
???? label Yes Yes
???? goto Yes Yes
46? ??????? ? ??????? ? ??????? ? ???????
? ? ????????? ?????? ?? ??????? ???
???? alt No Yes
???? interleave No Yes
???? activate No Yes
???? deactivate No Yes
???? return No Yes
47? ???? ? ???? ? ???? ? ????
? ? ?????? ??? ???? ???? ?????? ????
???????? create No Yes
??????? connect No Yes
????????? map No Yes
?MTC?? mtc No Yes
????????? system No Yes
????? self No Yes
???????? start No Yes
???????? stop No Yes
??PTC???? done No Yes
48? ???? ? ???? ? ???? ? ????
? ? ?????? ???????? ??????????
???? send No Yes
???? call No Yes
?????????? reply No Yes
?????????? raise No Yes
???? receive No Yes
???? trigger No Yes
?????? getcall No Yes
??????? getreply No Yes
???? catch No Yes
???? check No Yes
???? clear V Yes
??????? start No Yes
?????? stop No Yes
49? ????? ? ????? ? ????? ? ?????
? ? ?????? ??? ???? ???? ??????? ????
?? Start No Yes
?? Stop No Yes
????? read No Yes
???? timeout No Yes
? ???? ? ???? ? ???? ? ????
?? Verdict.set No Yes
?? Verdict.get No Yes
503?TTCN-3?????????????
TTCN-3????????????,??7-5?????????????????????
TTCN-3 ?????
? ? ? ? ? ???
???? interger, float, boolean, objectidentifier, verdicttype, duration range, list
????? bitsting, hexstring, octetstring, numericsting range, list
??????? printablestring, teletexstring, t6string, videotextring, visiblestring, iso1064string, ia5string, graphiacstring, generalstring, bmpstring,universalstring, utf8string range, list
???????? record, record of, set, set of, enumerated, union
511)????
??????????????????????TTCN-3??????????objectiden
tifier???????????(record of,set
of)?????????????ASN.1?TTCN??????
verdicttype???TTCN?????????,??none, pass,
inconclusive, fail?error????????,?????????????verd
ict???verdict???????set?get?????????verdict???????
none???pass,fail?inconclusive??,pass??inconclusive
?fail??,inconclusive??fail??,fail??????
52 ??????????,???????????????????verdict??????????
??,error??????????,????????????????????????? 2)
?? TTCN-3????????????,??????????????TTCN-3????
??????????????????,????????????????????????,??????
?????
533) ???????
?TTCN-3?,??????????????????????????????????????
????????????????????????????? ?7-3
?????????? Template MyPDU
MyTemplate filed1 field2 abcxyz field3
true MyPCO.receive(MyTemplate)
54- ?????????,TTCN-3????????????????????????
- ? ???(??????????)
- ? ???????
- ()????
- Complement()??????
- Omit???????
- ????
- ?????????
- (ltlowergttoltuppergt) ?lower?upper??????
55- ? ????????
- ??????????
- ??????????????????
- Permutation???????????
- ? ???????????
- length??????
- if present ????????
564?????
??,
57(No Transcript)
585?????
TTCN-3?????????????????,?????,????????????????
????????,IUT,TTCN????,????
597.3.3 TTCN-3????
1?TTCN-3???? TTCN-3?????????????????,???
??,????????????????????? ????,IUT
?????TTCN????(editor)????(complier),???(Executor)?
? ?????????????? 1) TTCN-3??????????????
2) ????????????????????? 3)
TTCN3??????????????,????????/????????C????????????
?
60TTCN-3??????
TTCN-3??????5??TTCN-3 Runtime Interface
(TRI)?,?TTCN-3????????????????????????????(TM)????
?(TE)????????(SA)??????(PA)??,??TM?TE???????????(T
CI),TE?SA/PA????????????(TRI)????
??TM???????,??????????????????TE???????TTCN-3?????
(ATS)?SA??????TTCN-3??????????????????????????????
?????????PA????????????????
61TTCN-3??????
TTCN-3????TRI???????,???????????????????????
?????????,TRI???JAVA?C/C???????
62TTCN-3 test systems in a nutshell
- TTCN-3 specifies a test but a test system is
needed for test execution - TRI and TCI standards define test system
architecture - TTCN- 3 tools are required to support internal
interfaces - Allows reuse of test platforms with different
tools but also for different SUTs - A test system requires
- A TTCN-3 tool TTCN-3 compiler and execution
environment - A test platform for a specific DUT
- Note Tools come with default Test Control
Logging
63An example adaptation A IPv6 test system
Test System Executor
TTCN-3 Test System
ParameterFile
IPv6 Codecs
ToolLogging
TCI
compiled IPv6 ATS
TTCN-3 Executable
TRI
Ethernet Adapter
Real-time Adapter
64Minimal Test Configuration
- All test behavior is executed on one (Main) Test
Component
65Example Concurrent Test Configuration
- A test involves execution of many Parallel Test
Components - Dynamic instantiation of components and
communication links
662. ??????1 Testing Technologies??(??)
1) ???? Testing Technologies???????????????
???????????????2000????,??Fraunhofer Institute
FOKUS??????Testing Technologies???????????????(?IT
U-T?ETSI)??????(?ATM??,OMG?TINA-C)??????
???????????????????,Testing Technologies??????????
??,????????????????????????????????????Testing
and Test Control Notation TTCN-3???ETSI?ITU-T????
????????????????????TTCN-3????????????????????????
672) TTCN-3??????? TTCN-3????????????????????(3GP
P, ETSI, EURESCOM, ATM ???)??????????,????????????
??????TTCN-3?????????????????????????
??????TTCN-3??????????????,?? ??????????
????????????????? ????????????????????
???????? ????????????
683) TTCN-3??? ??TTCN-3???????????,??????????????
?TTCN-3???????,?????,?????,??????,??????????
?????,????????????????????Sonus Networks?Texas
Instruments ?????,Vodafone,O2
??????????Navtel Communications?Tektronix
TTCN-3????????????????????????????????????
694) Testing Technologies????? TTworkbench
?????????????TTCN-3???????????? TTsuite VoIP
???????????? TTsuite-SIP??????SIP??????
????,TTsuite- SIP???????534??????????????,????ETSI
TS 102 027-1???? TTtwo2three
?TTCN-2?TTCN-3????? TT Consulting and
Teaching ?????????????????? TT Partners
Program ???????????
70TTworkbench ?? TTworkbench??TTworkbench
Basic?TTworkbench Professional?TTworkbench
Enterprise??????????????????????????????
TTworkbench ??? TTworkbench ??? TTworkbench ???
TTCN-3???????(CL Editor) v v v
???TTCN-3???(GFT???) v v
TTCN-3???(TTthree) v v v
ASN.1?IDL???? v v
????/??/??(TTman) v v
????/????/??(TTmex) v
71TTworkbench???? ??????????????????
????????,?????????????????,????????
???????????????????????? ?TTCN-3????????????
??????????????????
723. ????????
??????????????TTCN-3?????,?ITEX,??????SIPP???
737.4 TCL??
??TCL????????????,????Tcl???????????? 7.4.1
Tcl?????? ????????,Tcl???Linux???? 1?Tcl/Expec
t??????? 1) ?????Tcl?rpm???(ActiveTcl),Tcl????
????????Linux???Tk?X-windows? 2) ??,???
3) ????????,???????
74 ???TCL??????????? Expect????tcl????????,
??????????????????? expect?????????,??????tcl?????
???(????)?2??????1)?Linux?????????(?chmod???????
)?2)?Tcl????????tcl??,??????
ActiveTcl??????/usr/local/ActiveTcl(?expect?)
?????/usr/bin/tcl(?tclsh)?/usr/local/ActiveTcl/b
in/tclsh(tclsh8.4)
75(No Transcript)
76(No Transcript)
77(No Transcript)
78(No Transcript)
79- 4.1 ??????????
- 4.2 ?????????
- 4.3 ????????????
- 4.5 ???????
- 4.6 ????????????(TTCN)?????
- 4.4 ???????????
- 4.7 ????????
- 4.8 ???????????