© 2003 fokus/tip 1 testability interface test runtime interface (tri) george din, andreas hoffmann,...

23
© 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann , Ina Schieferdecker { din | a.hoffmann | schieferdecker } @fokus.fraunhofer.de

Upload: lauren-porter

Post on 27-Mar-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 1

Testability InterfaceTest Runtime Interface (TRI)

George Din, Andreas Hoffmann, Ina Schieferdecker

{ din | a.hoffmann | schieferdecker } @fokus.fraunhofer.de

Page 2: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 2

Overview

1. Prerequisites– TTCN-3 Language– A TTCN-3 Runtime System

2. Testability interface– The TTCN-3 Runtime Interface (TRI)– Input for T11 - Generalized execution environment

3. TTCN-3 Logging compliant vs. Hyades Monitoring L. 2– The TTCN-3 Logging Interface– Adapting TTCN-3 Logging to Hyades Logging Framework

Page 3: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 3

1. TTCN-3 LanguageA TTCN-3 Runtime System

Page 4: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 4

TTCN-3

• The Testing and Test Control Notation (version 3)• Standardized by ETSI 1999-2001• The standardized test specification and test

implementation language• Wide scope of application

– applicable to many kinds of test applications not just conformance, i.e. also for development, system, integration, interoperability, scalability … testing

– applicable in the telecom and IT domains– used both for standardized test suites– and as a generic solution in software development

• More details about TTCN-3 in 2nd presentation this afternoon

Page 5: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 5

Main Capabilities of TTCN-3

• Dynamic concurrent testing configurations• Synchronous and asynchronous communication

mechanisms• Encoding information and other attributes• Data and signature templates with powerful matching

mechanism• Assignment and handling of test verdicts• Test suite parameterization and testcase selection

mechanisms• Well-defined syntax, interchange format• Type and value parameterization

Page 6: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 6

TTCN-3 and Related Standards

ETSI ES 201 873-1 TTCN-3 Core Language (CL)

2nd presentation

ETSI ES 201 873-5 TTCN-3 TTCN-3 Runtime Interface

(TRI)

Later in this presentation

ETSI ES 201 873-6 TTCN-3 TTCN-3 Control Interfaces

(TCI)

2nd presentation

Page 7: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 7

Test System User

System Under Test (SUT)

Test Execution (TE)

Test Management (TM)

Platform Adapter (PA) System Adapter (SA)

Co

mp

on

ent

Han

dlin

g (

CH

)

Co

De

c (

CD

)

TTCN-3 Runtime System

TTCN-3programme

Port implementation

Timer and external functions

implementation

Communication between test components

Type and Value

Implem.

Start and stop test cases …

Page 8: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 8

Test System User

System Under Test (SUT)

Test Execution (TE)

Test Management (TM)

Platform Adapter (PA) System Adapter (SA)

Co

mp

on

ent

Han

dlin

g (

CH

)

Co

De

c (

CD

)

Test Control Interface

(TCI)

TTCN-3 Runtime Interface

(TRI)

TTCN-3 Runtime System

Page 9: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 9

Test Execution

Test System

+

communication

SUT

TE

ATS

Page 10: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 10

Eclipse based TTCN-3 Editor

Features• Syntax Highlighting

• Syntax Error Checker

• Outline View

• Task viewer for errors

• Keyword completion

• Context sensitive

To be integrated in Hyades

Page 11: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 11

2. The TTCN-3 Runtime Interface (TRI)Input for T11 - Generalized execution environment

Page 12: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 12

TRI – Communication Adaptation

Facts on the TTCN-3 Runtime Interface Standardized (part 5) Language independent

specification (IDL) Multi-vendor support

Communication adaptation Configuration dependent For each configuration done once Default timer implementation can be generated (PA)

Input for T11: the definition of a testable interface to SUT

TE

Test System User

SUT

TCI

TRI

CH

CD

SA PA

TM

Page 13: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 13

TRI – Interface Structure

Structure of interfaces applies to all TRI interfaces SA/PA reports status back to TE System adaptation: Communication with SUT Platform adaptation: timer and external functions implementation TE indicates error

TE

PA

TriPlatformPA

TriPlatformTE

SA

TriCommunicationSA

TriCommunicationTE

TE

Page 14: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 14

The TciCommunicationSA Interface

Defines setting up configuration and sending of message to and/or calling of operations in the SUT

Complete set of operations TriStatusType triSAReset();

TriStatusType triExecuteTestCase(...); TriStatusType triMap(...); TriStatusType triUnmap(...);

TriStatusType triSend(...); TriStatusType triCall(...); TriStatusType triReply(... ); TriStatusType triRaise(...);

TriStatusType triSUTactionInformal(...); TriStatusType triSUTactionTemplate(...);

SA

TriCommunicationSA

TriCommunicationTE

TE

Page 15: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 15

TriCommunicationTE Interface

Defines receiving of messages and/or calling of operations in the TE

Complete set of operations:➢ void triEnqueueMsg(...);➢ void triEnqueueCall(...);➢ void triEnqueueReply(...);➢ void triEnqueueException(...);

SA

TriCommunicationSA

TriCommunicationTE

TE

Page 16: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 16

TriPlatform Interface

Defines control of time and calling of external functions

Complete set of operations (PA)➢ TriStatusType triPAReset();➢ TriStatusType triStartTimer(...);➢ TriStatusType triStopTimer(...);➢ TriStatusType triReadTimer(...);➢ TriStatusType triTimerRunning(...);➢ TriStatusType triExternalFunction(...);

Complete set of operations (TE)➢ void triTimeout(...);

TE

PATriPlatformPA

TriPlatformTE

Page 17: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 17

Adapting Test Systems to SUT with TRI

• TRI – test and platform specific adaptation layer • TRI provides a set of operations ... independent of the

– target platform – SUT– middleware– implementation language

• TRI is a common interface to different types of SUTs– Defined in IDL – Mappings to Java and C exists

• Possible integration of existing Test Adapters (GSM, N-ISDN, B-ISDN, CORBA applications)

Page 18: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 18

HTTP Test Adapter examplepublic htmlTestAdapter extends TestAdapter{

private URL url = null;

public TriStatus triMap(TriPortId compPortId, TriPortId tsiPortId){te.triMap(compPortId, tsiPortId);

Thread runningThread = new Thread(){

public void run(){

. . . while (. . .) {

if(url != null){StringBuffer sb = new StringBuffer(); InputStream is = url.openStream();BufferedReader br = new BufferedReader(new InputStreamReader(is));String line = br.readLine();while (line != null) {

sb.append(line);line = br.readLine();

} TriMessage rcvMessage = new TriMessageImpl(sb.toString().getBytes());te.triEnqueueMsg(tsiPortId, new TriAddressImpl( new byte[] {}),

compPortId.getComponent(), rcvMessage); }}} . . .}

}public TriStatus triSend(TriComponentId componentId, TriPortId tsiPortId, TriAddress address,

TriMessage sendMessage){

byte[] mesg = sendMessage.getEncodedMessage();url = new URL(new String(mesg));

}}

Page 19: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 19

3. The TTCN-3 Logging InterfaceAdapting TTCN-3 Logging to Hyades Logging Framework

Page 20: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 20

TTCN-3 Logging Interface

• Logging of the TTCN-3 Execution Environment• Not standardized but adopted by TestingTech, Nokia• Logging Types:

– TCI specific: management of components, tests– TRI specific: management of timers, communication with

SUT– Error Handling: exceptions, errors– Debug: debugging information at execution

• Contains ~ 60 methods• The implementations usually produce XML events

Page 21: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 21

Test Logging API

logStartTestCase() logStopTestCase() logTestCaseStarted logTestCaseTerminated

. . . logCreateTestComponent() logStartTestComponent() logStopTestComponent()

. . . logSendConnected() logCallConnected() logReplyConnected() logRaiseConnected()

. . . logDebug() logEvent() logError()

Page 22: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 22

Compliance with Monitoring Level 2

• Data Collection– The Logging Interface is implemented as RAC server

– Hyades can connect anytime and collect logging data

• Visualization– Hyades views can be used

– For more detailed visualization, the Hyades views should be extended

• Implementation– Common Logging format for TTCN-3 (XML Schema)

– Common parser (TTCN-3 XML Logs CBE Events)

• Benefits– One common RAC Server for TTCN-3 Logging

Page 23: © 2003 Fokus/TIP 1 Testability Interface Test Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker

© 2003 Fokus/TIP 23

Summary

• Integration of TTCN-3 Editors in Hyades

• Propose TRI as SUT testable interface Input for T11 - Generalized execution environment Adopt TRI as general interface to SUT A large number of implementations already exist

• RAC server for TTCN-3 Logging interface• TTCN-3 specific Logs can be visualized in Hyades