A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN...
-
Upload
harry-benson -
Category
Documents
-
view
215 -
download
2
Transcript of A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN...
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 1
Conformance Testing of CORBA Services Conformance Testing of CORBA Services using Tree and Tabular Combined Notationusing Tree and Tabular Combined Notation
Alexey MednonogovAlexey Mednonogov
Helsinki University of TechnologyHelsinki University of TechnologyTelecommunications Software and Multimedia Laboratory
March 2000, Espoo FINLAND
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 2
Applications and TechniquesApplications and Techniques
Common Object Request Broker Architecture Middleware architecture for transparent communication in
heterogeneous environment (platform, language, location) Interoperable, robust, high-performance solutions Seamless interconnection of multi-vendor services
Conformance testing of CORBA using TTCN TTCN is a mature standardized framework for reusable
and automated testing of telecommunication systems Key success factor for ensuring reliability of distributed
Internet-based CORBA services and applications
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 3
Object Management ArchitectureObject Management Architecture
CORBA is the communications heart of OMA Reference Model
ORB is a low-level subsystem responsible for transparent communication of objects
CORBAservices define system interfaces complementing the basic functionality of ORB
CORBAfacilities provide standard frameworks for defining universal rules of engagement for CORBA-based collaborating objects
Object Management ArchitectureReference Model
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 4
CORBA Middleware ArchitectureCORBA Middleware Architecture Interface Definition Language
(IDL) acts as a primary contract between servers and clients, abstracting from the details of implementation, location in the network and the platform used
A client can introspect contents of Interface Repository (IFR) to find out which requests can be processed by a specific server and what data types are used
A server advertises its presence to clients by its Interoperable Object Reference (IOR)
OMG Common Object RequestBroker Architecture
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 5
Conformance Testing ArchitectureConformance Testing Architecture
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 6
CORBA Services Testing MethodologyCORBA Services Testing Methodology
Application-level CORBA clients and servers are being tested using remote test method in a single-party testing context (SPyT)
Low-level ORB protocols (GIOP/IIOP) and all other ORB components are assumed to be functioning properly
CORBA/TTCN gateway exploits DII, DSI & IFR to convert TTCN ASP to dynamic request / response and vice versa
As SUT cannot distinguish whether static or dynamic invocation scheme has been used, the implementation details of test environment are completely transparent from SUT perspective
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 7
IDL/TTCN Mapping: OverviewIDL/TTCN Mapping: Overview
IDL-to-TTCN Mapping Rules in a Nutshell
CORBA IDL entity TTCN entity
Instance of IDL interface(client or server object)
PCO declaration
IDL operation declarationA pair of ASPs(pCALL_… and
pREPLY_…)
Actual operation call A pair of TTCN constraints
IDL data types ASN.1 data types
IDL attribute declaration [The same as for operations]
IDL exception declaration Exception ASP (pRAISE)
IDL name resolution andinheritance mechanism
[Additional arrangementsare unnecessary]
Related work of GMD FOKUS & JIDM (NMF and X/Open) shall be acknowledged (basic concepts for mapping IDL operations, type definitions etc. to TTCN language)
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 8
IDL/TTCN Mapping: DetailsIDL/TTCN Mapping: Details
“Bit stuffing” concept is used for mapping IDL compound identifiers to a single TTCN identifier (symbolic chain “_i” acts as a separator and all “_” characters are duplicated, e.g. IDL “ModA_::_ModB::IntC” TTCN “PCO1_iModA___i__ModB_iIntC”)
CALL_ID field is introduced into every Exception, Call & Reply ASP to uniquely identify operation calls
Several forms of Registration ASP are defined for binding a specific TTCN PCO with CORBA client or server object
Our mapping allows catching group of exceptions defined within one IDL module/interface in one TTCN constraint
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 9
IDL/TTCN Mapping: Data TypesIDL/TTCN Mapping: Data Types
In most cases, IDL data types are naturally mapped to ASN.1 types without complications
Mapping for IDL “union” shall include information about exact value of discriminator
IDL “any” type is a real challenge!
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 10
CORBA/TTCN Gateway: OverviewCORBA/TTCN Gateway: Overview
Acts as an intermediary between Test System and SUT
The gateway itself is a CORBA-based Java application (ORBacus from OOC Inc. + OpenTTCN from OES Oy)
Distributed and interpreted nature of the test environment speeds up design of Abstract Test Suite (ATS), as well as facilitates testing in multi-party context (concurrent TTCN)
Relatively low performance of Java language is not of crucial importance, as performance measurements in conformance testing are not usually involved
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 11
CORBA/TTCN Gateway: ArchitectureCORBA/TTCN Gateway: Architecture
Builder, Visitor & Adapter design patterns are used
Visitor introspects ASP coming from the test environment
Builder constructs ASP either from server response or from client operation call
Adapter performs a technical conversion of information from IFR into internal format
Asynchronous mode of DII is used, what allows design of concurrent test suites or even simultaneous execution of several test suites served by one gateway component
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 12
Testing Gateway FunctionalityTesting Gateway Functionality
Two groups of test cases, 9 test cases in each group
One group for testing CORBA servers, another one for testing CORBA clients
A minimum set of tests of gateway states
Test Case ID Gateway Functionality Under Test
PrototypeInvocation of server operations,accepting client requests
Primitive IDL primitive data types
Oneway IDL oneway operations
Struct IDL structured data types
Choice IDL "union" data type
Context Operation "context" clause
Concurrent Concurrent operation calls
ExceptionHandling of user-defined &system exceptions
Abnormal Invalid and inopportune ASPs
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 13
Test Session ExampleTest Session ExampleTest Case
Test Case ID: tcINVOKE_COUNT
Test Group Reference: Operations/
Test Case Purpose:To test that after CORBA server object is registeredby its IOR and "increment" operation is invoked, itreturns the argument of the operation incrementedby one.
N L Behaviour Description Constraint Ref V C
1 PCO1_iArithmetic_iCount !pSREG_IOR START tSREG
cSREG_IOR(xIOR1_iArithmetic_iCount)
2 PCO1_iArithmetic_iCount ?pRAISE
c1RAISE_iGatewayException_iRecoverable_iGeneral
3 PCO1_iArithmetic_iCount !pCALL_iArithmetic_iCount_iincrement START tREPLY
c1CALL1_iArithmetic_iCount_iincrement
4 PCO1_iArithmetic_iCount ?pREPLY_iArithmetic_iCount_iincrement
c1REPLY1_iArithmetic_iCount_iincrement
P
5 ? TIMEOUT tREPLY F
6 PCO1_iArithmetic_iCount ?OTHERWISE
F
7 ? TIMEOUT tSREG F
8 PCO1_iArithmetic_iCount ?OTHERWISE
F
Two typical stages of testing CORBA service:
registering a CORBA object (pCREG_IOR)
issuing (or accepting) actual operation calls
IOR used for binding a PCO with CORBA server is supplied to ATS in form of PIXIT parameter
A. Mednonogov / Helsinki University of Technology / Conformance Testing of CORBA Services Using TTCN
/ 6.3.2000 / Page 14
ConclusionsConclusions
TTCN framework facilitates practical testing of active service components (servers), as it provides formal and standardized means for reusable & automated testing of telecom systems
Yet, TTCN does not show up enough flexibility in emulating a full-scale functionality of a typical CORBA servant, making TTCN-oriented processing of requests coming from reactive components (clients) look relatively awkward
If SUT mostly contains active parts (which is normally the case in testing CORBA services), then TTCN framework shall undoubtedly be preferred