You are on page 1of 22

TTCN-3 Big Picture

TTCN-3 a brief overview: DNS Server


Tester Send fully qualified hostname

Return IP-address Local N/W client Local DNS Main Test Component System Under Test

DNS Server Test Purpose


www.xyz.com => 24.25.27.29

Tester Client
(www.xyz.com,A)

SUT DNS

(www.xyz.com, 24.25.27.29,A)

Pass

Non-local DNS Query


Tester Send fully qualified hostname Parallel Test Component 1 Return IP-address Local N/W client Parallel Test Internets Component 2 root service

Local DNS Main Test Component Parallel Test Component 3 Remote DNS System Under Test

Extended Scenario.
PTC 1
CLIENT

SUT
DNS

PTC 2
ROOT NS

PTC 3
REMOTE DNS

query(www.xyz.com) query( xyz.com , NS)

answer(ns.xyz.com, xyz.com)

query(www.xyz.com)

answer(www.xyz.com, 24.25.27.29 )

answer(www.xyz.com, 24.25.27.29 ))

Pass

Main Test Component


CP_Msg
cp_client

type component MTC { port Cpport cp_client, port Cpport cp_root, port Cpport cp_ns

MTC
cp_root

CP_Msg }

CP_Msg
cp_ns

cp represents co-ordination ports generally used for inter-component

Parallel Test Component


type component CLIENT { port DNSPort pt_client, port Cpport cp_mtc }

DNSQuery pt_client CLIENT cp_mtc CP_Msg

Parallel Test Components


Test System Interface
type component TSI { port DNSPort pt_client, port DNSPort pt_root, port DNSPort pt_ns }

DNSQuery T S I pt_ns pt_client DNSQuery pt_root DNSQuery

The big picture


Client
cp_client cp_mtc pt_client

pt_client

MTC
cp_root

Root
pt_root cp_mtc pt_root

T S I SUT

pt_ns

Ns
cp_ns pt_ns cp_mtc

TestCase
testcase Testcase3() runs on MTC system TSI { var Client ClientComp ; var Root RootComp; var Ns NSComp; ClientComp := Client .create; RootComp := Root.create; NSComp := Ns.create; connect(RootComp: cp_mtc, mtc: cp_root); connect(NSComp: cp_mtc, mtc: cp_ns); connect(ClientComp: cp_mtc, mtc: cp_client); map(RootComp: pt_root, system:pt_root); map(NSComp: pt_ns, system:pt_ns); map(ClientComp: pt_client, system:pt_client);

TestCase-Contd..
RootComp.start (RootBehaviour()); NSComp.start (NSBehaviour()); ClientComp.start(ClientBehaviour()); all component.done; // block until ClientComp is done unmap(RootComp: pt_root, system:pt_root); unmap(NSComp: pt_ns, system:pt_ns); unmap(ClientComp: pt_client, system:pt_client); disconnect(RootComp: cp_mtc, mtc:cp_root); disconnect(NSComp: cp_mtc, mtc:cp_ns); disconnect(ClientComp: cp_mtc, mtc:cp_client); setverdict(pass); }

TTCN-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
TCI
COMPILED TTCN3

Test System Executor


TTCN-3 Test System Test Control Logging Codecs

TTCN-3 Executable

A test system requires


A TTCN-3 tool = TTCN-3 compiler and execution environment A test platform for a specific device under test ( ) Note: Tools come with default Test Control s + & Loggings) (

TRI SUT Adapter Platform Adapter

System Under Test (SUT)


TCI = TTCN-3 Control Interface TRI = TTCN-3 Runtime Interface
12

TTCN-3 Tutorial

Message flow
TTCN-3 Test System
TTCN-3 Executable Internal Communication TCI Test Control

MTC
Logging

PTC
TRI

PTC
Codecs

SUT Adapter

Platform Adapter

System Under Test (SUT) Implementation Under Test

 

A test involves execution of many parallel test components Dynamic instantiation of components and communication links

Test System User Test Manager


TCI
Component Handler
Controls diff components/threads at runtime

User Interface Error reporting Test Execution Tracking Logging Parameter Resolving TE provides: Entry points to TE towrds TM Start/Stop test case startt/stop control TM <->TE Standard Deriven (TCI) EX: tciStartTestCase() tciStartTestCaseStarted() tciLog() tciStopTestCase()

CH

Test Executable

CD

TRI Diff.Divices Divv . Vendors Diff.implmentations

Suite Adapter

Platform Adptr
EnCoding/Decoding Intenal TTCN3 to bitString towards SUT and ViceVersa

Sytem Under Test

TTCN-3 Cornerstones

Start and stop test cases Communication between test components


Component Handling (CH)

Necessary interfaces
Test System User TTCN-3 programme

Test Management (TM) CoDec (CD) Type and Value Implem. Timer and external functions implementation

Test Execution (TE)

System Adapter (SA)

Platform Adapter (PA)

Port implementation

System Under Test (SUT)

TTCN-3 Cornerstones

Necessary Interfaces
Test System User Test Management (TM)
Component Handling (CH)

Test Control Interface (TCI)

Test Execution (TE)

System Adapter (SA)

Platform Adapter (PA)

System Under Test (SUT)

CoDec (CD)

TTCN-3 Runtime Interface (TRI)

TTCN-3 Introduction

TTCN-3 in different test variants


Applicability of TTCN3 Could be Excellent Good better...

Conformance testing Interoperability testing Service, function and feature testing Performance testing Stress, robustness and load testing Real-time testing Regression testing
20

The TTCN-3 Standards


(free download at http://www.ttcn-3.org/Specifications.htm)

ES 201 873-1 (Z.140)


 TTCN-3 Core Language

ES 201 873-5
 TTCN-3 Runtime Interface (TRI)

ES 201 873-6
 TTCN-3 Control Interfaces (TCI)

ES 201 873-7 and onwards (under development)


 Using ASN.1, XML, IDL, C/C++ with TTCN-3

TTCN-3 Tutorial

21

TTCN-3 can automate Conformance and Interoperability Testing

d i g i t a l d i g i t a l

1 2 3 4 5 6 7 8 9 * 8 #

1 4 7 *

2 5 8 8

3 6 9 #

1 4 7 *

2 5 8 8

3 6 9 #

TTCN-3 Tutorial

22

You might also like