contact: [email protected] 1 2

22
TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes 1 Hochschule Osnabrück University of Applied Sciences Contact: r.toenjes@hs- osnabrueck.de 1 2 Test-controlled Development of Communication Services Ralf Tönjes 1 , Marten Fischer 1 , Patrick Wacht 2 University of Applied Scienc Osnabrück, Germany University of Applied Scien Frankfurt, Germany N-3 User Conference 2011 9 June 2011 - Bled, Slovenia

Upload: aya

Post on 14-Jan-2016

22 views

Category:

Documents


0 download

DESCRIPTION

Test-controlled Development of Communication Services Ralf Tönjes 1 , Marten Fischer 1 , Patrick Wacht 2. Contact: [email protected] 1 2. University of Applied Science Osnabrück, Germany. University of Applied Science Frankfurt, Germany. TTCN-3 User Conference 2011 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes1

Hochschule OsnabrückUniversity of Applied Sciences

Contact:[email protected]

1

2

Test-controlled Developmentof Communication Services

Ralf Tönjes1, Marten Fischer1, Patrick Wacht2

University of Applied Science Osnabrück, Germany

University of Applied ScienceFrankfurt, Germany

TTCN-3 User Conference 20117 – 9 June 2011 - Bled, Slovenia

Page 2: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes2

Hochschule OsnabrückUniversity of Applied Sciences

Agenda

Motivation

Architecture

Service Description

Service Behaviour Model

Test Code Generation

Test Execution

Page 3: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes3

Hochschule OsnabrückUniversity of Applied Sciences

Motivation

Testing of communication services is becoming increasingly importantgrowing complexity of logicshort time to market desired

manual testing is time and cost consuming test automation required

current service creation environments (SCE) do not support test automation

Error

Page 4: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes4

Hochschule OsnabrückUniversity of Applied Sciences

How can Test Automation be Realised?

Model-Based Testing

Model describes how a system should behave in response to an action (behaviour model)

Supply the action and see if the system responds as expected

Model System

Abstract tests

Executable tests

are derivedfrom

can be runagainst

are abstract versions of

is a partial description of

Page 5: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes5

Hochschule OsnabrückUniversity of Applied Sciences

Architecture

Test Creation Evironment

Service Description

Modelling Behaviour

Model

Test Case Generator

Service Creation

Environment

Test Framework

ttcn3

----------

TTCN-3 Test Cases

Service SIP Application

Server

Modular Sub FiniteState Machines

Step 1

Step 2 Step 3

Step 4

Page 6: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes6

Hochschule OsnabrückUniversity of Applied Sciences

Step1: Formal Recording of Service Description

5 Stages Procedure Adopted from telecom software development process OTES

(Objects Through Essential Services)

1. Short textual description of use cases

2. Identification of roles of communication participants(e.g. browser, SIP-phone, Database)

3. Requirement specification (including pre- and post-conditions, i.e. states, andtarget action, i.e. messages sequence, for users)

4. Enhanced requirements specification(including technical details, such as value ranges, names of databases, tables and fields)

5. Identification of the communication interfaces(5-tuple of source and destination IP-address, port and protocol)

Page 7: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes7

Hochschule OsnabrückUniversity of Applied Sciences

Example: Click-to-Instant-Message (Click2IM)

Requirement Click2InstantMessage_01

Stage 1: Description

After request of web site, input of destination address and text required. Inputs will be approved and the text will be transfered to the softphone having the destination address. Receipt of test will then be confirmed.

Stage 2: Roles

• Web Browser• SIP Softphone

Stage 3: Preconditions

• Web site accessible• Destination address filled in• Text filled in• Approved inputs

Target Softphone accessible

Postcondition • Softphone has received text• Confirmation is shown on web site

Stage 4: •….

Page 8: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes8

Hochschule OsnabrückUniversity of Applied Sciences

TTCN-3 requirements:

1. message flow description derived from FSM (test cases)

2. test environment/SUT description using connectivity

concept (ports, component, Test Adapter, …)

3. test data (type definitions, templates)

Behaviour Model Editor with 3 specialised perspectives

Step2: Creation of Service Behaviour Model

Editors

FSMEditor

Test DataEditor

ConnectivityEditor

Page 9: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes9

Hochschule OsnabrückUniversity of Applied Sciences

Composition of FSM (Finite State Machine)

sFSM (sub Finite State Machine) Reusable templates, which represent predefined message flows from standards internal transitions are fixed, external transitions used to realise composition usually protocol specific (e.g., SIP, TCP, HTTP)

Composition of sFSM with Transaction User

sFSM-M1sFSM-M2

Page 10: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes10

Hochschule OsnabrückUniversity of Applied Sciences

The FSM Connector: Transaction User (TU)

interfaces of the sub finite state machines have the TU as sender or receiver

acts as mediator between possible client and server roles

does not contain information about the service implementation

Page 11: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes12

Hochschule OsnabrückUniversity of Applied Sciences

Connectivity Concept: Composition of SUT/Test Environment Description

Element Description

Compontent test component; contains the server and client specific protocol endpoints (Ports)

Port Interface between test environment and SUT (e.g. SIP Port or HTTP Port)

Global Timer Timer; usable in any state or as event on transition; ensures a state is left in or after a specific amount of time

Action Reactions to an event; set on transition; either send a message or manipulate variable/timer

Guard Additional conditions for transitions; validates content of a message or value of a variable

Primitive Variables Simple variables; used in context with Guards

Page 12: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes13

Hochschule OsnabrückUniversity of Applied Sciences

Component ComponentDefinition

TTCN-3GlobalTimers

Protocol Timers

PortsM1: ResponseM2: Request Type

Definition

PortDefinitionEvent

Condition

Templates

Timer

Connectivity Concept

Adapter Configuration

Actions

Connectivity Concept:Mapping to TTCN-3

Page 13: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes14

Hochschule OsnabrückUniversity of Applied Sciences

Test Data Editor

create and edit message templates message structure reflected in tree view specific for one port and its protocol

Example

Page 14: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes15

Hochschule OsnabrückUniversity of Applied Sciences

Behaviour Model Editors

Test DataEditor

ConnectivityEditor (TTCN-3 ports, timer, …)

Abstract Test Case Generator

TTCN-3

FSM Editor

FSMPath-finder

FSM&Connectivity Parser

TTCN-3 CodeGenerator

Behaviour Model Analyser

Step 3: Abstract Test Case Generation

Page 15: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes16

Hochschule OsnabrückUniversity of Applied Sciences

Test Case Generation: FSM Pathfinder

Path set of states and transitions between start- and end-state of

FSM

Pathfinder finds all possible paths in FSM between start and end state

FSM considered as deterministic branching = new test case employs depth-first-search

Page 16: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes17

Hochschule OsnabrückUniversity of Applied Sciences

Test Case Generation: FSM Parser

s1 s2p1.msg/p1.msg2

function s1_1() runs on c1 {

p1.send(msg);

alt {

p1.receive(msg2) -> …. { s2_1(); }

}

}

Each path converted into test case by FSM Parser state converted into a TTCN-3 function body content of function specified by outgoing transition FSM written from the service’s point of view message based

actions must be inverted

Page 17: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes18

Hochschule OsnabrückUniversity of Applied Sciences

Test Case Generation: Connectivity Parser

Component Definition

Name of Component

Timer

Primitive Variables

Message Variables

Ports Type of Port

Name of Port

Parameter

own block in editor;connected with comp.

automatically generated for each message template

+ system component (only ports and static name)

generates component using parameter from Connectivity Editor

Page 18: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes19

Hochschule OsnabrückUniversity of Applied Sciences

Test Adapter configuration fileName of Port Protocol (TCP/UDP)

Role (Server/Client)Remote IP / Port

Local IP / Port Parameter/Port

Port Definition

Name

Type

send/receivable Message Types

Parameter

reference in model

Test Case Generation: Connectivity Parser

generates port using parameter from Connectivity Editor generates configuration file for Test Adapter (parameter provided in Ports)

Page 19: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes20

Hochschule OsnabrückUniversity of Applied Sciences

Test Case Generation: TTCN-3 Code Generator

Writes the acquired / generated data as TTCN-3 code using Velocity*

Generated Files for Test

Environment

ttcn3ttcn3

ttcn3

ta .conf

FSM ParserResult

javajava

java

Velocity

Velocity Templates for

TTCN-3 Generation

templatetempl

atetemplate

* Java based Template Engine (http://velocity.apache.org)

Page 20: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes21

Hochschule OsnabrückUniversity of Applied Sciences

Step 4: Test Execution

TTCN-3 code will be executed after the code generation has been completed by the Test Case Generator

Execution realised within a Test Environment (e.g. TTWorkbench)

Test results are stored in a database to measure the development progress

Iterative delta testing: only new or modified test cases executed

Test Framework for synchronisation of test developer and service developer

Page 21: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes22

Hochschule OsnabrückUniversity of Applied Sciences

Conclusion

Novelty: New approach eases the generation of test cases by1. composing predefined finite state machines (FSM) for protocol sequences

to a behaviour model (BM) of a service.

2. From the BM a TTCN-3 test suite is automatically derived.

3. The new concept of Transaction User (TU) enables testing of value added services

Benefits: Integration of Service Creation and Testing Development of functional tests in parallel to service development

ensuring automated TTCN-3 based testing of services Testing is integrated in a service creation environment allowing for

regression tests

Re-Use by Others: General Applicability test generation can be used for any SCE generic configurable test adapter based on Java for TTCN-3 (e.g. for TCP,

UDP ,…) universal codec for generation of test patterns has been implemented

Page 22: Contact: r.toenjes@hs-osnabrueck.de 1 2

TTCN-3 User Conference, June 7-9, 2011, Bled, Slovenia Prof. Dr.-Ing. Ralf Tönjes23

Hochschule OsnabrückUniversity of Applied Sciences

References

1. P. Wacht et al.: A New Approach to Design Graphically Functional Tests for Communication Services, IEEE NTMS, Paris, 7-10 February 2011.

2. P. Wacht et. al.: ComGeneration: die Dienstebeschreibung als Basis für automatisiertes Testen, VDE/ITG Fachtagung Mobilkommunikation, Osnabrück, 18-19 May 2011.

3. A. Lehmann et al.: “TeamCom: A Service Creation Platform for Next Generation Networks”, IEEE ICIW 2009, Venice/Mestre, Italy, 24-28 May 2009.