TTCN-3

Last updated

TTCN-3(Testing and Test Control Notation version 3) is a strongly typed testing language used in conformance testing of communicating systems. TTCN-3 is written by ETSI in the ES 201 873 series, [1] and standardized by ITU-T in the Z.160 Series. [2] TTCN-3 has its own data types and can be combined with ASN.1, IDL and XML type definitions.

Contents

Standard organization

ITU-T TTCN-3 standard is part of the Z Series and is organized in several parts:

Language organization

Module
The top level container in a test suite is a module. It is usually a file.
Component
component is an execution entity. A test case or a function is executed on a component.
Port
Components communicate with each other or with the SUT through ports that are mapped to each other.
Test case
A test case is a sequence of sends and receives. When a message is sent to the SUT (System Under Test) several possibles replies can be received.
Alternative
Since a test case is a sequence of stimuli followed by a set of possible responses, the notation includes alternatives. It is a compact way to list all the possible alternatives in a scenario.
Template
When sending or receiving information the value of the parameters are of paramount importance. They must be defined when sent and they must be verified when received. The template construct aims at defining the parameters values when sent or verifying the parameter values when received. Since parameters can be quite complex, defining and verifying the values is not a matter of a single line. The template allow complex verification in a single statement so that the test case stays legible.
Verdict
The verdict is the result of a test case execution. It has 5 possible values: none, pass, inconc, fail, error.

Applications

TTCN-3 has been used to define conformance test suites to SIP, WiMAX, and DSRC standard protocols.

The Open Mobile Alliance adopted in 2008 a strategy of using TTCN-3 for translating some of the test cases in an enabler test specification into an executable representation. [3]

The AUTOSAR project promoted (2008) the use of TTCN-3 within the automotive industry. [4]

The 3GPP project promoted the use of TTCN-3 within the mobile industry. [5]

Architecture

When executing the architecture is organized as follow:

Example code

This is an TTCN-3 example with its graphical equivalent in MSC (Message Sequence Chart).

MSC (Message Sequence Chart) representation of a basic TTCN-3 (Test and Testing Control Notation) scenario. MSC representation of a TTCN-3 test case.png
MSC (Message Sequence Chart) representation of a basic TTCN-3 (Test and Testing Control Notation) scenario.
moduleTestSystem{// Define a subtype of integertypeintegermyNewType(0..50)// Declare Request struct type with 2 fieldstyperecordRequest{myNewTypeparam1,charstringparam2}// Declare Answer struct type with one fieldtyperecordAnswer{myNewTypeparam1}// Declare a message based communication porttypeportcEnv_typemessage{outRequest;inAnswer;}// Declare the component on which the test case will runtypecomponentsSystem{portcEnv_typecEnv;}// The templates define the outgoing parameter values// and verify the incoming parameter valuestemplateRequestGood_Req:={param1:=42,param2:="hello !"};templateAnswerAll_is_OK:={param1:=0};// Define testcase1 that will run on sSystem componenttestcasetestcase1()runsonsSystem{// Send Request message with (42, "hello !") as parmeterscEnv.send(Good_Req);// An alternative for the 2 possible answersalt{// Do we receive Answer with 0 as parameter[]cEnv.receive(All_is_OK){// Pass verdict !setverdict(pass)}// Or do we receive something else[]cEnv.receive{// Fail verdictsetverdict(fail)}}}// Control part chains test cases execution automaticallycontrol{varverdicttypeverdict1;verdict1:=execute(testcase1());}}

See also

Related Research Articles

In computer science, test coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs. A program with high test coverage, measured as a percentage, has had more of its source code executed during testing, which suggests it has a lower chance of containing undetected software bugs compared to a program with low test coverage. Many different metrics can be used to calculate test coverage; some of the most basic are the percentage of program subroutines and the percentage of program statements called during execution of the test suite.

The Session Initiation Protocol (SIP) is a signaling protocol used for initiating, maintaining, and terminating real-time sessions that include voice, video and messaging applications. SIP is used for signaling and controlling multimedia communication sessions in applications of Internet telephony for voice and video calls, in private IP telephone systems, in instant messaging over Internet Protocol (IP) networks as well as mobile phone calling over LTE (VoLTE).

Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include the process of executing a program or application with the intent of finding software bugs, and verifying that the software product is fit for use.

Abstract Syntax Notation One (ASN.1) is a standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and especially in cryptography.

Generic programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplication. Such software entities are known as generics in Python, Ada, C#, Delphi, Eiffel, F#, Java, Nim, Rust, Swift, TypeScript and Visual Basic .NET. They are known as parametric polymorphism in ML, Scala, Julia, and Haskell ; templates in C++ and D; and parameterized types in the influential 1994 book Design Patterns.

The ISDN User Part or ISUP is part of Signaling System No. 7 (SS7), which is used to set up telephone calls in the public switched telephone network (PSTN). It is specified by the ITU-T as part of the Q.76x series.

TTCN is a programming language used for testing of communication protocols and web services. A TTCN test suite consists of many test cases written in the TTCN programming language. Until version 2 the language was written in tables and called Tree and Tabular Combined Notation. Reading and editing this language required special TTCN editors. Beginning with version 3 TTCN was renamed to Testing and Test Control Notation. It is now closer to current programming languages and can be edited with traditional editors. TTCN-3 is more flexible than TTCN-2 in that it can be used for protocol testing as well as testing traditional software.

The High Level Architecture (HLA) is a standard for distributed simulation, used when building a simulation for a larger purpose by combining (federating) several simulations. The standard was developed in the 90s under the leadership of the US Department of Defense and was later transitioned to become an open international IEEE standard. It is a recommended standard within NATO through STANAG 4603. Today the HLA is used in a number of domains including defense and security and civilian applications.

In software testing, test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes. Test automation can automate some repetitive but necessary tasks in a formalized testing process already in place, or perform additional testing that would be difficult to do manually. Test automation is critical for continuous delivery and continuous testing.

Model-based testing

Model-based testing is an application of model-based design for designing and optionally also executing artifacts to perform software testing or system testing. Models can be used to represent the desired behavior of a system under test (SUT), or to represent testing strategies and a test environment. The picture on the right depicts the former approach.

Specification and Description Language (SDL) is a specification language targeted at the unambiguous specification and description of the behaviour of reactive and distributed systems.

SystemVerilog hardware description and hardware verification language

SystemVerilog, standardized as IEEE 1800, is a hardware description and hardware verification language used to model, design, simulate, test and implement electronic systems. SystemVerilog is based on Verilog and some extensions, and since 2008 Verilog is now part of the same IEEE standard. It is commonly used in the semiconductor and electronic design industry as an evolution of Verilog.

Glossary of Unified Modeling Language (UML) terms provides a compilation of terminology used in all versions of UML, along with their definitions. Any notable distinctions that may exist between versions are noted with the individual entry it applies to.

ProActive Parallel Suite is an open-source software for enterprise workload orchestration, part of the OW2 community. A workflow model allows to define the set of executables and scripts written in any scripting language along with their dependencies, so ProActive Parallel Suite can schedule and orchestrate executions while optimising the use of computational resources.

This article describes the syntax of the C# programming language. The features described are compatible with .NET Framework and Mono.

The 3GPP/NGN IP Multimedia Subsystem (IMS) multimedia telephony service (MMTel) is a global standard based on the IMS, offering converged, fixed and mobile real-time multimedia communication using the media capabilities such as voice, real-time video, text, file transfer and sharing of pictures, audio and video clips. With MMTel, users have the capability to add and drop media during a session. You can start with chat, add voice, add another caller, add video, share media and transfer files, and drop any of these without losing or having to end the session. MMTel is one of the registered ICSI feature tags.

The Encoding Control Notation (ECN) is a standardized formal language that is part of the Abstract Syntax Notation One (ASN.1) family of international standards. ECN is designed to be used along with ASN.1, and each ECN specification is explicitly related to a particular ASN.1 specification.

In software development, a test suite, less commonly known as a 'validation suite', is a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviours. A test suite often contains detailed instructions or goals for each collection of test cases and information on the system configuration to be used during testing. A group of test cases may also contain prerequisite states or steps, and descriptions of the following tests.

In database management systems (DBMS), a prepared statement or parameterized statement is a feature used to execute the same or similar database statements repeatedly with high efficiency. Typically used with SQL statements such as queries or updates, the prepared statement takes the form of a template into which certain constant values are substituted during each execution.

Real-time testing is the process of testing real-time computer systems.

References