© 2012 wipro ltd | 1 version 1.0a, 23 rd april 2012 ttcn-3 users conference practical application...

11
© 2012 WIPRO LTD | WWW.WIPRO.COM 1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with common TTCN-3 Runtime Interface (TRI) for multiple interfaces Rajesh Kumar Bathina, Technical Leader, Wipro Technologies

Upload: jenna-oneil

Post on 26-Mar-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM1 Version 1.0a, 23rd April 2012

TTCN-3 Users Conference

Practical application of TTCN-3 for network verification with common TTCN-3 Runtime Interface (TRI) for multiple interfaces

Rajesh Kumar Bathina,Technical Leader, Wipro Technologies

Page 2: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM2

Candidate Details

Name Rajesh Kumar Bathina

Organization Wipro Technologies

E-Mail ID [email protected]

Phone number +49 151 4350 5388

Date of Presentation 13th June’ 2012

Photo

Page 3: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM3

Overview

Page 4: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM4

Overview

Technical Problem

TTCN-3 is widely accepted for wireless network verification with TRI (TTCN-3 Runtime Interface) towards various protocol interfaces.

Ports defined with specific TRI can handle the send/receive messages towards the System Under Test, which also involves encoding/decoding.

Practically, there were some scenario’s which we have faced during our network testing that we could not automate using TTCN-3 alone.

Some requirements we found difficult to automate includes o Man Machine Language commands required to be sent to the Network Element during the testcase

execution or as preamble/postamble.o Connectivity to configuration servers to run batch scripts to alter the NE behavior special

configuration setup required during the test case executiono Database (ODBC) modifications using scripts during the test case executiono Configuration changes to Non SUT Network elements during execution

Subsequent slides will provide the details of our approach to address above issues.

Page 5: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM5

How is it achieved

TSI

MTC GSM2GSM1

SUT

TRI

MS

MSA

MS

MSB

Mediation port

CP

Communication port (CP)

Med

iatio

n S

erve

rMediation port

ODBCSQL / SQL Lite

SSH / Tel

net

SS

H /

Tel

net

Page 6: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM6

How is it achieved cont…

• Common TRI (Mediation Port) A commonly defined port (Mediation Port) in Master Test Component (MTC) is

introduced which accepts a message with script name and parameters to the script The TRI will connect to a common Linux Server called Mediation Server where we

can store the scripts that are required to be executed when needed from TTCN-3 On receiving a message from Mediation Port the TRI will initiate the execution of the

scripts with the parameters supplied via the messages. Execution of the intended scripts will happen in the Mediation Server Scripts can be in any language and the selection can also be performed based on the

parameter we pass in the message.

• Mediation Server / Mediation Device A simple Linux server configured within the same IP segment as that of the external

devices is used All required packages/Modules were installed (example Perl SSh, Perl SSh Expect,

Perl Telnet Etc.) Command Line Shell For SQLite is configured so as to access the database tables.

Page 7: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM7

Detailed Approach

We introduced a single port from MTC and can still be able to execute multiple scripts (shell scripts in our case) through the TTCN-3 test case.

Perl SSh, Perl SSh Expect or Perl telnet modules were also successfully tested for special configuration setup required during the testcase execution.

The common connectivity to Mediation server is achieved by having a defined set of messages to be sent/received from Mediation ports (e.g. as shown below):

Preamble.sh par1 par2Preamble.sh par1 par2

Postamble.sh par1 par2Postamble.sh par1 par2

External Connections

External Connections

type record MD_UNIXcmd  {    PDU_MD_UNIXcmd msg  }// end type record MD_UNIXcmd

type port Mediation_port message  {    inout MD_UNIXcmd,         MD_UNIXresp  }

Page 8: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM8

Detailed Approach Cont…

The message can also contain various fields like the script name, parameters to the script, execute user identification.

A wrapper / template function is used in order to populate the actual message structure with the script name to be executed, user id to execute the scripts and parameters to the script.

MD_Script_execution_SR(Userid, Mediation_port, “ODBC_transaction.sh”, "parameter_to_sh");...MD_Script_execution _SR(in template charstring userID, in template charstring id_ne_script, in template charstring param1, in template charstring param2) := { user := userID id := id_ne_script, action_RENAMED := MD_action_change, parm := { { name := "param1", value_RENAMED := { string := param1 } }, { name := "param2", value_RENAMED := { string := param2 } }  } }

Page 9: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM9

Detailed Approach Cont…

On reception of the message from Mediation Port, the TRI will execute the scripts on the Mediation Server directly passing the parameters supplied through the TTCN-3 scripts.

The TRI will first lock the script before executing it so that no other parallel execution can be run.

As soon as the execution of the scripts is completed, the TRI will unlock the scripts and sends back the UNIXresp to the Mediation Port which can further be validated in the TTCN-3 for specific response.

• Avoiding Deadlock Locking and unlocking of scripts during execution so that the same scripts cannot be

accessed via parallel execution. During the postamble phase all the connections established with the Mediation Server

should be closed so that the consecutive executions will not get blocked.

Page 10: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM10

Benefits of this Approach

• Advantages of using this approach are: MML commands required to be sent to the Network Element during the testcase execution or

as preamble/postamble.  Database (ODBC) modifications using Command Line SQL/SQLite scripts during the testcase

execution  Configuration changes to Non SUT Network elements during execution were achieved.  Perl SSh, Perl SSh Expect or Perl telnet modules can be used for special configuration setup

required during the testcase execution. This approach will be reduced compilation times when change is needed as the changes can

be moved to the scripts (shell or perl) which does not require any compilation. This approach will be very handy if there are different interfaces that needs to be developed

over a short duration and with the help of the scripts (perl or shell) we can achieve most of our requirements like ODBC access and interactive scripts execution via Perl SSH expect. We only have to call the scripts when required from the TTCN-3.

Interop between MTC and non SUT is possible by using this approach where any configuration changes needed during the execution that affects the behaviour of SUT can be achieved.

• Organizational Benefits: This can be integrated with existing suites.The defined message structure is re-usable in

various testing scenarios. Most of our network testing and system testing will require us to perform some interface

parameter modification during the execution which can be achieved through this approach. The message structure can be made an ASN.1 notation format and can be re-used in

conjunction with various testing requirements.

Page 11: © 2012 WIPRO LTD |  1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical application of TTCN-3 for network verification with

© 2012 WIPRO LTD | WWW.WIPRO.COM11

Thank You

Rajesh Kumar Bathina

Wipro Technologies