230 likes | 251 Views
Testability Interface Test Runtime Interface (TRI). George Din, Andreas Hoffmann , Ina Schieferdecker { din | a.hoffmann | schieferdecker } @fokus.fraunhofer.de. Overview. Prerequisites TTCN-3 Language A TTCN-3 Runtime System Testability interface The TTCN-3 Runtime Interface (TRI)
E N D
Testability InterfaceTest Runtime Interface (TRI) George Din, Andreas Hoffmann, Ina Schieferdecker { din | a.hoffmann | schieferdecker } @fokus.fraunhofer.de
Overview • Prerequisites • TTCN-3 Language • A TTCN-3 Runtime System • Testability interface • The TTCN-3 Runtime Interface (TRI) • Input for T11 - Generalized execution environment • TTCN-3 Logging compliant vs. Hyades Monitoring L. 2 • The TTCN-3 Logging Interface • Adapting TTCN-3 Logging to Hyades Logging Framework
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
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 matchingmechanism • Assignment and handling of test verdicts • Test suite parameterization and testcase selection mechanisms • Well-defined syntax, interchange format • Type and value parameterization
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
Test System User Test Management (TM) CoDec (CD) ComponentHandling (CH) Test Execution (TE) System Adapter (SA) Platform Adapter (PA) System Under Test (SUT) Start and stop test cases … TTCN-3 Runtime System TTCN-3programme Communication between test components Type and Value Implem. Timer and external functions implementation Port implementation
Test Control Interface (TCI) Test System User Test Management (TM) TTCN-3 Runtime Interface (TRI) CoDec (CD) ComponentHandling (CH) Test Execution (TE) System Adapter (SA) Platform Adapter (PA) System Under Test (SUT) TTCN-3 Runtime System
Test Execution Test System ATS TE + communication SUT
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
2. The TTCN-3 Runtime Interface (TRI)Input for T11 - Generalized execution environment
Test System User TM TCI CH CD TE TRI SA PA SUT 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
TRI – Interface Structure TE TE TriCommunicationTE TriPlatformTE TriCommunicationSA TriPlatformPA SA PA • 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
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(...);
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(...);
TE TriPlatformTE TriPlatformPA PA 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(...);
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)
HTTP Test Adapter example public 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)); } }
3. The TTCN-3 Logging InterfaceAdapting TTCN-3 Logging to Hyades Logging Framework
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
Test Logging API • logStartTestCase() • logStopTestCase() • logTestCaseStarted • logTestCaseTerminated . . . • logCreateTestComponent() • logStartTestComponent() • logStopTestComponent() . . . • logSendConnected() • logCallConnected() • logReplyConnected() • logRaiseConnected() . . . • logDebug() • logEvent() • logError()
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
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