MSG::= SEQUENCE

people.cs.aau.dk
  • No tags were found...

MSG::= SEQUENCE

Automating SoftwareTesting at Siemens MPBrian Nielsen, Ph.D.bnielsen@cs.auc.dkDepartment of Computer Science,Aalborg University, Denmark


RRLP case study


Case Study• USA FCC Wireless E911 Rules• Enabling technology for futureLocation Based Services• RRLP = Radio Resources Location Services• Protocol for communicating LocationInformation and/or Measurements to networkfrom MS.• Supports• MS Based and MS Assisted types, and• GPS and EOTD measurement methods


E-OTDd1BaseStationMeasurementerror marginBase Stationd2Base Station


LCS ArchitectureLMUType ACBCCBC-SMLCSMLCLpSMLCUmCBC-BSCLbLsHLRMSBTS(LMUType B)AbisBSCAMSC/VLRLgLhGatewayMLCLeExternalLCS clientLgLcLMUType BAbisGatewayMLCOther PLMNgsmSCF


RRLPRRLP(04.31)RR(04.08)RRRelayBSSLAPRelayBSSAP BSSAP BSSAP-LERRLP(04.31)BSSLAP(08.71)BSSAP-LE(09.31)L2( LAPDm)L2(LAPD)SCCPSCCPSCCPSCCPL1L1MTPMTPMTPMTPTarget MS BSC MSC SMLCUm A Ls= highest layer where segmentation of upper layers is supported+RRAP = Radio Ressources Application Protocol


RRLP


RRLP• In principle a simple request/reply protocol!• Specification distributed across several ETSIGSM standards• Vague, ambiguous, implicit• Detailed domain knowledge andunderstanding of surrounding protocolsrequired• Long, complex parameter lists• Message syntax takes 12 A4 pages of ASN.1Type Declarations(+syntax errors)!!


Baroque!!• baroque adj. [common] Featureencrusted;complex; gaudy; verging onexcessive. Said of hardware or (esp.)software designs, this has many of theconnotations of elephantine ormonstrosity but is less extreme and notpejorative in itself.http://info.astrian.net/jargon/terms/b/baroque.html


Ambigious1. When MS receives a RRLP message, that contains IEs orelements of components that are syntactically incorrect, theMS sends a Protocol Error component with indication”incorrect data”2. ”When after the reception of a Masurement Position Requestcomponent, but before responding with a MeasurementPosition Response or Protocol Error, the MS receives a newRRLP message with the Measure Position Requestcomponent, it acts as followsA. If the old and new Measurement Request Components have thesame reference number, the latter is ignored.B. If the old and new Measure Position Request components havedifferent reference numbers, the MS aborts the formercomponent, and starts to act according to the latter componentand sends a response to that. ”• [GSM 4.31 v 8.6.0]


Example 1SSMSRRLP_Position_Request(1, validRequest_Component)•Protocol Error due rule1!RRLP_Position_Request(1, InvalidRequest_component)RRLP_Protocol_Error(1,IncorrectData)RRLP_Position_Response(1,Valid_measurement)


Example 1SSMSRRLP_Position_Request(1, validRequest_Component)RRLP_Position_Request(1, InvalidRequest_component)•Protocol Error due rule1!•Ignored due to rule 2.A,hence Position Response!RRLP_Protocol_Error(1,IncorrectData)RRLP_Position_Response(1,Valid_measurement)


Example 1SSMSRRLP_Position_Request(1, validRequest_Component)RRLP_Position_Request(1, InvalidRequest_component)•Protocol Error due rule1!•Ignored due to rule 2.A,hence Position Response!•Both protocol Error and Response(robustness)RRLP_Protocol_Error(1,IncorrectData)RRLP_Position_Response(1,Valid_measurement)


Example 2SSMSRRLP_Position_Request(1, validRequest_Component)RRLP_Position_Request(2, InvalidRequest_component)RRLP_Protocol_Error(2,IncorrectData)•Protocol Error due rule1 and 2b•Both protocol Error and Respons(robustness)RRLP_Position_Response(1,Valid_measurement)


Test Equipment• 2*CRTG (4 channels) 2 * 200 k€


Test Equipment• Complete Type Approval Test System (3 M€)


Simulated Net ConfigurationBTSVisible?Neighbor?ABCBCX÷AYZ÷÷÷ZXY


Aspects to test• RRLP behavior FSM• Message en/decoder (PER)• Interaction with underlying protocols (RRAPand RR)• Integration of RRLP and EOTD computationcomponent• Precision• Precision of measurement results• Integration of EOTD-computation with low level(DSP) SW• Correct calculations of EOTD component


Test situations• RRLP measurement during• Emergency Call and Normal call• RR channel Established, but no call• SIM card present/absent• SMS received during call• Before, after, and during handover• Call waiting / holding• Different combinations of number and visible BTSs• ...


Rohde & Schwartz Testcase../*---------------------------------------------*//* Wait for CONNECT and send CONNECT ACK *//*---------------------------------------------*/if (!CallAccepted(&TchCarrier,(tpByte)&L3Message,MessagePool[CONNECT_ACK],&TI,&FrameTxd,&FrameRxd)){ exit(FAILURE); }/*---------------------------------------------*//* Wait for Instruction to Clear Call *//*---------------------------------------------*/if (!UserAction("\nPress a key to Terminate Call\n”,KEYPRESS_REQUIRED)){ exit(FAILURE); }/*---------------------------------------------*//* Perform Call Clearing initiated by Network *//*---------------------------------------------*//*3 0 3 fMessage file template - CONNECT_ACK*/#define CONNECT_ACK 8/*6 0 3 25 2 e0 90Message file template - DISCONNECT*/#define DISCONNECT 9/*3 0 3 2aMessage file template- RELEASE_COMPLETE*/#define RELEASE_COMPLETE 10if (!CallClearing(&TchCarrier,MessagePool[DISCONNECT],(tpByte)&L3Message,MessagePool[RELEASE_COMPLETE],&TI))


Telecom LanguagesASN.1SDL TTCNMSC/HMSC• ASN.1• Abstract Syntax Notation 1• Defines messages syntax and contents• TTCN• Tree and Tabular Combined Notation• Test case programming language• MSC• Message Sequence Charts• Describes interactions between entities• SDL• Specification and design language• Models system structure and behavior


ASN.1


ASN.1• Abstract Syntax Notation One• ITU-T X.680 and X.690 series• ISO/IEC 8824 and 8825• For specification of data (e.g. Messages)• syntax of messages and other data structures• encoding of messages and other data structures• Primitive types• INTEGER, BOOLEAN, IA5String, BIT STRING,• etc.,• Type constructors• structures (SEQUENCE),• lists (SEQUENCE OF),• choice between types (CHOICE),• etc.▼


ASN.1• Fully integrated in the formal languages SDL andTTCN• Several associated standardized encodings, such as:• efficient (binary) encoding: Packed Encoding Rules (PER)• canonical encoding for digital signatures:Distinguished Encoding Rules (DER)• XML encoding rules (XER)• Offers extensibility and interworking betweenpreviously deployed systems and newer,updated versions designed years apart• ASN.1 website: http://asn1.elibel.tm.fr


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3MSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}TypeConcrete: messageas it is transferredover a real network11101001010011010010111…Bitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3MSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}TypeConcrete: messageas it is transferredover a real network11101001010011010010111…Bitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3MSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}TypeConcrete: messageas it is transferredover a real network11101001010011010010111…Bitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3MSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}TypeConcrete: messageas it is transferredover a real network11101001010011010010111…Bitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3MSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}TypeConcrete: messageas it is transferredover a real network11101001010011010010111…Bitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3Concrete: messageas it is transferredover a real networkMSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}Encoding Rules11101001010011010010111…TypeBitstream▼


ASN.1Types, Values and BERAbstract: messageas it appears in anETSI standard(X.680)Value 1Value 2Value 3Concrete: messageas it is transferredover a real networkMSG::= SEQUENCE{ item1 INTEGER,item2 STRING }MSG MSG m1MSG m2 { item1m3 { item1 { item1123, 789, 123,item2 item2 item2"XYZ" "ABC" “ABC”} }}Encoding Rules11101001010011010010111…TypeBitstream▼


ASN.1 RRLP Types GSM 4.31RRLPPDU ::= SEQUENCE {referenceNumber INTEGER (0..7),componentRRLPComponent}RRLPComponent ::= CHOICE {msrPositionReqmsrPositionRspassistanceDataassistanceDataAckprotocolError... -- extension marker!}MsrPosition_Req,MsrPosition_Rsp,AssistanceData,NULL,ProtocolError,MsrPosition_Req ::= SEQUENCE {positionInstruct PositionInstruct,referenceAssistData ReferenceAssistData OPTIONAL,msrAssistDataMstAssistData OPTIONAL,systemInfoAssistData SystemInfoAssistData OPTIONAL,gps_assistDataGPS_AssistData OPTIONAL,extensionContainer ExtensionContainer OPTIONAL,…,rel98MsrPositionReq_Extension Rel98MsrPositionReq_Ext OPTION


GSM 4.31 (contd.)PositionInstruct ::= SEQUENCE {-- Method typemethodTypeMethodType,positionMethodPositionMethod,measureResponseTime MeasureResponseTime,useMultipleSets UseMultipleSets,environmentCharacter EnvironmentCharacter OPTIONAL}MethodType ::= CHOICE {msAssisted AccuracyOpt,msBased Accuracy,’msBasedPref Accuracy,msAssistedPref Accuracy}AccuracyOpt ::= SEQUENCE { accuracy Accuracy OPTIONAL }Accuracy ::= INTEGER (0..127)PositionMethod ::= ENUMERATED {eotd (0),gps (1),gpsOrEOTD (2)}And so forth for 12 A4 pages


ASN.1 Value Notation (RRLP)aRRLPMessage RRLPPDU ::= {referenceNumber: 1 ,rr_component msrPositionReq: {positionInstruct: {methodType msAssisted_brian: { } ,positionMethod eotd_carsten,measureResponseTime 7 ,useMultipleSets oneSet }referenceAssistData {bcchCarrier 50 ,bsic 1 ,timeSlotScheme equalLength } ,msrAssistData {msrAssistList { {bcchCarrier 70 ,bsic 3 ,multiFrameOffset 50 ,timeSlotScheme equalLength,roughRTD 1249 } ,{bcchCarrier 60 ,bsic 2 ,multiFrameOffset 13 ,timeSlotScheme variousLength,roughRTD 13 }} } } }


PER Example (1)(octet 0)01 Sequence numberRRLP componentExtension bit: No extension present00 Choice number 0: position requestPosition RequestExtension bit: No extension present(octet 1)1000 Option bit map: referenceAssist present,msr assist presenPosition Instructionoption bit map : env character not present0 Choice methodtype ms assisted.(octet 2)Option bit map: Accuracy not present0 Position method (eotd=0)11 Measure response time = 7Use multiple sets = one set.Reference AssistDataOption bit map: BTS position Not Present(octet 3)0001100,10 BCCH 5000001 BSIC 1


PER Example (2)(octet 5)0 Time slot SchemeMSR Assist Data0001 LENGTH = 2 (2-1: NB Effective length of 1..15 is Len-1)MSR Assist BTS 10 Option Bit Map:calc Assistance Data not present00,01000110 BCCH 70(octet 7)000011 BSIC 311,0010 Multi Frame Offset 500 time Slot Scheme (equal Length)100,11100001 Rough RTD 1249(octet 10)MSR ASSIST BTS 20 Option Bit map: calc Assistance Data Not Present0000111,100 BCCH 6000001,0 BSIC 20001101 multi Frame Offset 131 Time Slot Scheme Various Length(octet 13)00000001,101 Rough RTD00000 padding for octet alignment=‘001000001100000000011110000011001000000100001000010001100000111100100100111000010000011110000001000110110000000110100000'B


MSCMessage Sequence Charts


▼MSC• Message Sequence Charts• ITU-T Z.120• For specification of message flows• Component interactions• Interface boundaries• sequential ordering of messages, timersetc.• Releases 1990, 1994, 1996 and 2000


Application of MSCs• Requirements capturing• Use cases• Behavior Modelling• Trace visualization• Property language• Test case specifications• Test purpose specification


MSC behavior• Instances, events, and actions• Instance creation, termination• Timers• Conditions• Co-regions• Causal ordering• Inline expressions• Lost and found messages


MSC Timers and ConditionsMSC DialT1(0.5s)PhoneOffHookPhoneCOtimeoutDialToneT1(60s)settingconditionsDial(96358883)ringingParty_respondscancel timerconnected


MSC dynamics• No notion of channels or buffering• “every message has an unboundedFIFO queue”• Logical time• Events on an instance are totallyordered• Send(m) before receive (m)MSC basici1m1m3i2m2i3anActioni1:send(m1) before i2:recv(m1)i1:send(m1) before i1:recv(m3)i2:recv(m1) before i2:send(m2)i2:send(m2) before i2:anActioni2:send(m2) before i3:recv(m2)i2:anAction before i2:send(m3)i2:send(m3) before i1:recv(m3)i1:recv(m3) concurrent i3:recv(m2)MSC overtakei1m1m2i2


MSC Ordering Conceptsguarding conditionschoiceMSC TalkMSC TalkPhonePhoneCOPhonePhoneCOWHEN connectedWHEN connectedTalkTalk(bla. bla bla)(yak, yak, yak)ALTTalkTalk(bla. bla bla)(yak, yak, yak)co-region = ”any order”+specification of causalordering of events / actionsTalk(yak, yak, yak)Talk(bla. bla bla)


Inline Expressions• Choice• Parallel• Loop• Optional• ExceptionalALTPARLOOPOPTEXC


Structural Concepts• MSC references• Gates• High Level MSCs• Instance Decomposition


MSC referencesReference expression operators•parMSC Phonecall•altPhone•seqDial•loop•exc•opt•emptyTalk_A2B par Talk B2APhoneCO


Gates• ”Export / Import” mechanism for messagesMSC Phone_SystemMSC Relay_callPhone_APhoneCO_APhoneCO_BPhone_BPhoneCO_APhoneCO_Bg1DialDialg1(96358883)Relay_callg2Ring(96358883)Dial(8883)Ringg2actualinput gateactualoutput gateinput gatedefinitionoutput gatedefinition


High-Level MSCs• Graphical overview of therelation between MSCs• Focus on control structure• Constructs for• Looping• Sequential composition• Alternative (sequentialcomposition)• Parallel composition• ConditionsMSC TransmitconnectionRequestfail establishedDataTransmission


MSC 2000• Improved Data Support• Interface for data type definition languages• Variable declarations• Parameterized MSCs• Synchronous Operations• MSC 2000 to be adopted as UML SCs?


TTCN


Behavior TreesProcess 1receive(request1)//process reqsend(response1)Process 2receive(request2)//process reqsend(response2)Testerend (request1) to p1end (request2) to p2XPECT(response1) ??XPECT(response2) ??Implementationp1p2


Behavior TreesProcess 1receive(request1)//process reqsend(response1)Process 2receive(request2)//process reqsend(response2)Testerend (request1) to p1end (request2) to p2XPECT(response1) ??XPECT(response2) ??Implementationp1p2Message Ordering is NON-Deterministic ~ Unpredictable


Behavior TreesProcess 1receive(request1)//process reqsend(response1)Process 2receive(request2)//process reqsend(response2)Testerend (request1) to p1end (request2) to p2XPECT(response1) ??XPECT(response2) ??Implementationp1p2Message Ordering is NON-Deterministic ~ UnpredictableTest Cases must branch = Trees


Behavior TreesProcess 1receive(request1)//process reqsend(response1)Process 2receive(request2)//process reqsend(response2)Behavior Treerequest1ABTesterend (request1) to p1end (request2) to p2XPECT(response1) ??XPECT(response2) ??Implementationp1p2request2Cresponse1DresponseEMessage Ordering is NON-Deterministic ~ UnpredictableTest Cases must branch = Trees


Tree and Tabular CombinedNotation• For specification of tests (of systems)• test architectures• communication to the object being tested• test behaviour based on trees• An ISO/ITU-T standard (adopted by ETSI)• ISO/IEC 9646-3• X.290 Series• Version 1, 2 and now 3• Two formats• Graphical (GR)• Machine Processable (MP)


Main Components of TTCN• Test Suite Structure• Test Suite, Test Groups, Test Case, Test Steps• Data declarations• Points of Control and Observation (PCO’s),• Abstract Service Primitives (ASP’s)• PDU Data Types (TTCN data types / ASN.1)• Constraints• Actual instances of PDUs to be sent• Patterns of PDUs expected to be received• Dynamic behaviour trees (Test Cases)• Send, Receive, Timers, Expressions, Qualifiers• Test Steps


TTCN Tests Reactive Systems• Message Based Communication• Asynchronous• PCO = Point of control andobservation ≈ bi-directionalmessage Q• PDU = Protocol Data Unit ≈message• ASP = Abstract Service Primitive≈ “procedure invoked bymessage”• L!A ≈ send A via pco L• L?X ≈ receive A via pco LTTCNTesterL!A L?XIUTPCO L


Tree and TabularlterativesNr12345678910LabelBehaviorACFGDEIJBHconstraint verdictSequenceFBehavior TreeABC D EG IJH•Same indentation level = Alternatives•Increasing indentation level = Sequence


Example of a Test CaseTest Case Dynamic BehaviourTest Case Name : TC1Group: A_SUITE/GROUP1/GROUP2Purpose: An exampleDefaults: DEF1Comments :Nr L Behaviour Description Constraint Ref V Comments12345678910[X=1]L! PDU_1 START T1L? PDU_2 CANCEL T1?OTHERWISE?TIMEOUT T1[X=2]L! PDU_3 (A:=A+1)L? PDU_4+ A_Test_Step (3)?OTHERWISEP1P2P3P4PFIPF


TTCN statements• Send Statement• L!N_DATArequest [B=1] (X:=3) START T1• If b=1 then X:=3 then l!N_DataRequest followed by START T1• Receive Statement• L?N_DATArequest [B=1] (X:=3) CANCEL T1• If a matching N_DATArequest message is at the head of L and if[B=1] then (X:=3)followed by CANCEL T1• Timeout Statement• T1?Timeout [B=1] (X=readTimer(T)) START T2• Otherwise Statement• L?OTHERWISE• Catch all (if no listed matching alternative exist)• Goto statement• Goto


TTCN Constraints• PDU / ASP type definitionPDU::= SEQUENCE {sequenceNo INTEGER (0..20),Item2 INTEGER OPTIONAL}• Example constraintsexampleConstraint PDU {sequenceNo 5,Item2 7}invalidSeq PDU {sequenceNo 0,Item2 * -- anyOrOmit}validSeq PDU {sequenceNo (1..20), --rangeItem2 ? -- any Value}response5 PDU {sequenceNo 5,Item2 expectedItem5}--predefined constraint


TTCN matching mechanismsMatchingMechanismTypeConstraintValueMatchingValueNonMatchingValueSpecific ValueINTEGER991Value RangeINTEGER (1..10)(2..6)5, ’110’B1,20Value ListINTEGER(3,5,7,13,17)134AnyValueINTEGER (1..10)BITSTRING[3]??5’111’B0, 11’01’BPERMUTATIONSEQUENCE OFINTEGER{PERMUTATION(1,2,3) }{3,2,1}{1,4,2}PERMUTATIONSEQUENCE OFINTEGER{PERMUTATION(1,*) }{3,2,1}, {1}{2}, {2,3,4,5}IF_PresentINTEGEROPTIONAL7 IF_PRESENT7, -8


RRLP Test ArchitecturePCOdial 112wait for ”mobile in service”MTCUTMSIUTRRLP_PositionRequestRRLP_PositionResponse...PCOSSGSM Layer 1 & 2


RRLP Test Case


RRLP non-determinism• MS receives secondwhile performingmeasurement• MS receives second requestafter completing first requestMobile StationRRLPEOTD


RRLP test case 2


Position Response Constraintc_Rsp_1__ValidEOTDMeasurementResult_(refNo: ReferenceNumber){ rRLPPDU1 {referenceNumber 1 ,rr_component msrPositionRsp:{referenceIdentity ref_identity( lac_BTS_A , cellID_BTS_A),otd_MeasureInfo validotd_ref_A}}}


RRLP TTCN Constraintvalidotd_ref_A OTD_MeasureInfo{otdMsrFirstSets {refFrameNumber ? , -- AnyValuereferenceTimeSlot ? ,toaMeasurementsOfRef {refQuality ? ,numOfMeasurements ?} ,stdResolution ?,taCorrection *, -- AnyOrOMITotd_FirstSetMsrs ({ --value listotd_msr( bcch_BTS_C , bsic_BTS_C),otd_msr( bcch_BTS_B , bsic_BTS_B),},{otd_msr( bcch_BTS_B , bsic_BTS_B),otd_msr( bcch_BTS_C , bsic_BTS_C),})}-- OMITted fields are not allowed


TTCN-3• Synchronous operations• Notations• MSC 2000 is a graphical notation• Tabular format• Textual format :More like a programming language(Concepts for PCO, PTC, Verdicts etc)• Support for other IDLs than ASN.1• Improved matching, type and valueparameterization• Ability to specify encoding information


TTCN-3• ETSI conformance test specifications are in TTCN.• TTCN-3 developed by ETSI Technical Committee MTS (Methods forTesting and Specification).• Application Domain• protocol testing including mobile and Internet protocols• supplementary service testing,• module testing,• testing of CORBA based platforms,• testing of APIs etc.• TTCN-3 is no longer restricted to conformance testing.• interoperability,• robustness (torture),• regression,• system and integration testing.http://www.itu.int/ITU-T/studygroups/com17/ttcn.htmlhttp://www.etsi.org/ptcc/home.htm (ETSI Protocol and TestingCompetence Center)


TTCN-3 Test casefunction PO49901(integer FL) runs on MyPTC {L0.send(A_RL3(FL,CREF1,16));TAC.start;alt {[] L0.receive(A_RC1((FL+1) mod 2)) {TAC.cancel}[] TAC.timeout {verdict.set(inconclusive)}[] any.receive {verdict.set(inconclusive)}}END_PTC1()// Function call}


Synthesizing Test cases


Translation rules•Maps abstract parameter lists to ttcnconstraint names•Parameterizes constraints•Places test cases in test groupsTranslation of MSCs to TTCNStructural Structuralmodelof oftest interface(SDL) (SDL)ASN.1•Types•ValuesTTCN “Master” file•Predefined constraints / values•TTCN test casesTTCNMasterMSC’s are thetest-casesAutoLink AutoLinkTranslatorTTCNEditorTTCNEditorMergeTest –SuiteTTCN


RRLP Example


RRLP example 2


RRLP example 2


Modeling test steps


RRLP non-determinism• MS receives secondwhile performingmeasurement• MS receives second requestafter completing first requestMobile StationRRLPEOTD

More magazines by this user
Similar magazines