Documentos de Académico
Documentos de Profesional
Documentos de Cultura
What is scripting?
A scripting language, script language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the end-user. Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile-link-run process.
Unix-Shell:
A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. Operating system shells generally fall into one of two categories:
Command-line shells provide a command-lineinterface (CLI) to the operating system. while graphical shells provide a graphical user interface (GUI).
Features include:
Scripts can be invoked as commands by using their filename. May be used interactively or non-interactively. Allow both synchronous and asynchronous execution of commands. provides a set of built-in commands. provides flow control constructs, quotation facilities, and functions. typeless variables. sh provided support for environment variables using keyword parameters and exportable variables. It contains strong provisions for controlling input and output and in its expression matching facilities. Disadvantages: The Bourne shell was not as friendly for interactive use. It lacked an expression grammar. Even simple arithmetic had to be done using the external test and expr utilities.
TCL/TK:
Tcl (originally from "Tool Command Language", but conventionally rendered as "Tcl" rather than "TCL"; pronounced as tickle or tee-see-ell) is created by John Ousterhout. It is commonly used for rapid prototyping, scripted applications, GUIs and testing. Tcl is used on embedded systems platforms, both in its full form and in several other small-footprinted versions.
Features Include:
All operations are commands, including language structures. They are written in prefix notation. Commands are commonly variadic. Everything can be dynamically redefined and overridden. All data types can be manipulated as strings, including source code. Event-driven interface to sockets and files. Time-based and user-defined events are also possible. Variable visibility restricted to lexical (static) scope by default, but uplevel and upvar allowing procs to interact with the enclosing functions' scopes. All commands defined by Tcl itself generate error messages on incorrect usage. Extensibility via C, C++, Java.
# Good style would put the expression (1+2+3+4+5, in this case) inside {curly braces}
set sum [expr 1+2+3+4+5] puts "The sum of the numbers 1..5 is $sum.
#expr function will be evaluated faster if curly braces are added on the equation.
set sum [expr {1+2+3+4+5}] puts "The sum of the numbers 1..5 is $sum.
Disadvantages:
Because Tcl scripts are interpreted instead of compiled, execution of the scripts will obviously be slower than an equivalent C or C++ implementation. One of the more serious shortcomings of Tcl/Tk is the lack of a rich set of data structures. The lack of aggregate data structures increases the need for global variables as a means of inter-procedural and inter-module communication in situations where procedural parameters are not possible.
Perl:
Perl is a high-level, general-purpose, interpretted, dynamic language. Perl was originally developed by Larry wall The language provides powerful text processing facilities without the arbitrary data length limits of many contemporary Unix tools, facilitating easy manipulation of text files.
Features include:
The overall structure of Perl derives broadly from C. Perl is procedural in nature, with variables, expressions, assignment statements, brace-delimited blocks, control structures, and subroutines. Perl has many built-in functions that provide tools often used in shell programming such as sorting, and calling on system facilities. Perl is often used as a glue language, tying together systems and interfaces that were not specifically designed to interoperate, and for "data munging", that is, converting or processing large amounts of data for tasks such as creating reports. Perl code can be made portable across Windows and Unix. Perl/Tk is commonly used to enable user interaction with Perl scripts. Perl is widely favoured for database applications. Its text-handling facilities are useful for generating SQL queries; arrays, hashes, and automatic memory management make it easy to collect and process the returned data. String processing and especially Regular expression support: Perl is a winner in everything related to string processing. Perl is best known for its regexp capabilities.
Disadvantages:
Too many special constructs Hard to build data structures Another major disadvantage to Perl is that of function (or subroutine, in Perl lingo) signatures, or rather, the lack of signatures.
TTCN-3
Testing and Test Control Notation Version 3 Internationally standardized testing language
Product of the ETSI Technical Committee MTS (Methods for Testing and Specification)
A programming language that has been used for more than 15 years in standardization as well as industry
Specifically designed for black box testing and certification Constantly developed and maintained at ETSI by a team of leading testing experts from industry, institutes, and academia
A testing technology that applies to a variety of application domains and types of testing
Knowledge of TTCN-3 is valuable both for employees as well as employers due to its wide applicability Offers potential for reducing training and test maintenance costs significantly Proven to work in very large and complex industrial tests, e.g., 3G network elements
ES 201 873-5
TTCN-3 Runtime Interface (TRI)
ES 201 873-6
TTCN-3 Control Interfaces (TCI)
13
14
Tool Logging
IPv6 Codecs
TTCN-3 Executable
Ethernet Adapter
Real-time Adapter
16
d i g i t a l
d i g i t a l
1 2 3 4 5 6 7 8 9 * 8 #
1 2 3 4 5 6 7 8 9 * 8 #
1 2 3 4 5 6 7 8 9 * 8 #
TTCN-3
TTCN-3
17
Data and signature templates with powerful matching mechanisms (including regular expressions)
Attributes for encoding, display or user-defined information Test suite parameterization Control of Test Case execution and selection mechanisms Control of complex test configurations Assignment and handling of test verdicts Harmonized with ASN.1 (XML and IDL coming)
18
Tabular
PresentationF ormatn
19
20
DnsClient
timer t_ack t_ack alt mw_dnsAnswer("172.26.1.17") pass m_dnsQuestion("www.etsi.org")
DnsPort
fail
t_ack inconc t_ack
21
Group
Purpose System Interface MTC Type Comments Local Def Name t_ack Type timer Behavior serverPort.send(m_dnsQuestion("www.etsi.org")); t_ack.start(1.0); alt { [] serverPort.receive(mw_dnsAnswer("172.26.1.17")) { setverdict (pass); } [] serverPort.receive // any other message { setverdict(fail); } [] t_ack.timeout { setverdict(inconc); } } t_ack.stop; Detailed Comments: 22 Initial value Comments DnsClient
23
MTC
Communication with IUT
MTC
Logging
PTC
TRI
PTC
Codecs
SUT Adapter
Platform Adapter
A test involves execution of many parallel test components Dynamic instantiation of components and communication links
25
integer, boolean, float, bitstring, hexstring, octetstring, charstring, universal charstring record, record of, set, set of union, enumerated
27
28
29
TTCN-3 Module
Module () Module Definitions Module Control
} module EtsiDnsTests { // Test definition part control { // Test execution part // (optional) }
30
Definitions Part
module EtsiDnsTests { // Message structure // Actual test data // Test configuration // Test Case definitions }
31
33
Test Configuration
type port DnsPort message { inout DnsMsg } // Note: port types may also allow multiple different // message types or restrict the direction type component DnsClient { port DnsPort serverPort } // Note: component types can also define multiple port // instances of the same or different port type and // declare timers, constants or variables
34
Test Behaviour
query
mtc
serverPort
response
testcase TC_resolveEtsiWww() runs on DnsClient { timer t_ack; serverPort.send(m_dnsQuestion("www.etsi.org")); t_ack.start(1.0); alt { [] serverPort.receive(mw_dnsAnswer("172.26.1.17")) { setverdict(pass); } [] serverPort.receive { // any other message setverdict(fail); } [] t_ack.timeout { setverdict(inconc); } } t_ack.stop; }
35
Module Definitions
Module Control
TTCN-3 Benefits
TTCN-3 is easy to learn Unambiguous specification and execution of tests
Look and feel of a regular programming language
Well defined syntax, static - and operational semantics Enables completely automated test execution
Five different commercial TTCN-3 tools on the market
Off-the-shelf tools and test systems are readily available Open source community now taking shape
Tools as well as test suites and useful modules
Can be used to specify tests for standardization as well as proprietary product features Flexible testing technology
Virtually no limits to adapt a test system to your needs Scalable allows test systems to grow over time
37
Applications
Used for development of any new conformance test suite, e.g., SIP (VoIP), IPv6 (Core, Mobility, Security), HiperMAN / WiMax, 3GPP IP Multimedia Subsystem, Applied in a variety of application domains, e.g., telecom, automotive, financial.
38