You are on page 1of 8

39

CHAPTER 5

LANGUAGE SPECIFICATION

5.1 TOOL COMMAND LANGUAGE


Tcl is a high-level, general-purpose, interpreted, dynamic
programming language. It was designed with the goal of being very simple
but powerful. Tcl casts everything into the mould of a command, even
programming constructs like variable assignment and procedure definition.
Tcl supports multiple programming paradigm, including object- oriented,
imperative and functional programming or procedural styles. It is commonly
used embedded into C applications, for rapid prototyping, scripted
applications, GUIs, and testing. Tcl interpreters are available for many
operating systems, allowing Tcl code to run on a wide variety of systems.
Because Tcl is a very compact language, it is used on embedded systems
platforms, both in its full form and in several other small-footprint versions.
The popular combination of Tcl with the Tk extension is referred to as
Tcl/Tk, and enables building a graphical user interface(GUI) natively in Tcl.
Tcl/Tk is included in the standard Python installation in the form of Tkinter.

5.2 FEATURES OF TCL

Tcl's features include

i. All operations are commands, including language structures. They


are written in notation
ii. Commands are commonly variadic.
iii. Everything can be dynamically redefined and overridden. Actually,
there are no keywords, so even control structures can be added or
changed, although this is not advisable.
iv. All data types can be manipulated as strings, including source
code. Internally, variables have types like integer and double, but
40

converting is purely automatic.


v. Variables are not declared, but assigned to. Use of a non-defined
variable results in an error.
a. Fully dynamic, class-based object system, Tcl OO,
including advanced features such as meta-classes, filters, and
mixins.
vi. Event-driven interface to sockets and files. Time-based and user-
defined events are also possible.
vii. Variable visibility restricted to lexical (static) scope by default,
but uplevel and upvar allowing procs to interact with the enclosing
functions' scopes.
viii. All commands defined by Tcl itself generate error messages on
incorrect usage.
ix. Extensibility, via C, C++, Java, and Tcl.
x. Interpreted language using bytecode
xi. Full Unicode (3.1) support, first released 1999.
xii. Regular expressions that became the de facto regex standard referred
to a tcl.
xiii. Cross-platform: Windows API; Unix, Linux, Macintosh etc.
xiv. Close, cross-platform integration with windowing (GUI) interface
Tk.
xv. Multiple distribution mechanisms exist:
1. Full development version (e.g., ActiveState Tcl)
2. Tclkit (single file executable containing a
complete scripting runtime, only about 2
megabytes in size)
3. Starkit (wrapping mechanism for delivering an
application in a self-contained, installation-free,
and highly portable way)
4. Starpack (combine Starkit with Tclkit to
41

produce a Starpack - a single platform specific


executable file, ideal for easy deployment)
5. The Jim Interpreter, a small footprint Tcl
implementation
6. Freely distributable source code under a BSD
license.
5.3 Advantages of Tcl
One of the primary advantages of Tcl/Tk is that the source code is
freely available on the Internet from Sun Microsystems. Consequently, there
is no need to deal with the economic burden nor the administrative overhead
of paying for the package initially and paying again for subsequent upgrades
and bug fixes. The author of the package. John Ouster out, has adamantly
stated that the Tcl core and Tk extension will always be freely available.
In addition, neither licenses nor royalties are required when distributing
applications built with the language.

By making the source code freely available, two other advantages


arise. First, that fact that Tcl/Tk is free has undoubtedly contributed to its
widespread use. The Tcl/Tk community is estimated to number in the tens
of thousands, therefore providing the new user with a well-established
user-base to fall back on for assistance and guidance. This user-base is
easily reached via the Usenet newsgroup comp.lang.tcl. Second,
freely distributing the source code leads to open development of the
package. End users are free to fix bugs and make suggestions and
enhancements to the existing Tcl core. The existence of a clean, well-
documented functional interface to the internal mechanisms of Tcl makes it
relatively easy to extend Tcl to include features which are either too slow or
not directly supported in Tcl. If the extensions are deemed useful to the
Tcl community as a whole, then these extensions may be integrated into
the core in the next release for the benefit of all users.
42

Programming a GUI can be a very arduous and demanding chore.


Tcl/Tk helps make the task easier by raising the level of abstraction for the
programmer, thereby making the implementation of user interfaces easier
and quicker. Graphical interfaces written using Tcl/Tk typically require
significantly less code than an equivalent interface written in C. Tcl is
relatively easy to learn and provides most of the features one would expect
from a general-purpose programming language. Since Tcl is an interpreted
scripting language, there is no need for the developer to compile the code.
This makes rapid prototyping more feasible with Tcl/Tk.
43

CHAPTER 6

SYSTEM TESTING

6.1 INTRODUCTION

The purpose of testing is to discover errors. Testing is the process of


trying to discover every conceivable fault or weakness in a work product. It
provides a way to check the functionality of components, sub assemblies,
assemblies and/or a finished product It is the process of exercising software
with the intent of ensuring that the Software system meets its requirements
and user expectations and does not fail in an unacceptable manner. There
are various types of test. Each test type addresses a specific testing
requirement.

6.2 TYPES OF TESTS

6.2.1 Unit testing


Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs
produce valid outputs. All decision branches and internal code flow should
be validated. It is the testing of individual software units of the application
.it is done after the completion of an individual unit before integration.
This is a structural testing, that relies on knowledge of its construction and
is invasive. Unit tests perform basic tests at component level and test a
specific business process, application, and/or system configuration. Unit
tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and
expected results.
44

6.2.2 Integration testing


Integration tests are designed to test integrated software
components to determine if they actually run as one program. Testing is
event driven and is more concerned with the basic outcome of screens or
fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is
specifically aimed at exposing the problems that arise from the combination
of components.

Organization and preparation of functional tests is focused on


requirements, key functions, or special test cases. In addition, systematic
coverage pertaining to identify Business process flows; data fields,
predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.
6.2.3 System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable
results. An example of system testing is the configuration oriented system
integration test. System testing is based on process descriptions and flows,
emphasizing pre-driven process links and integration points.

6.2.4 White Box Testing


White Box Testing is a testing in which in which the software tester
has knowledge of the inner workings, structure and language of the
software, or at least its purpose. It is purpose. It is used to test areas that
cannot be reached from a black box level.
45

6.2.5 Black Box Testing


Black Box Testing is testing the software without any knowledge of
the inner workings, structure or language of the module being tested. Black
box tests, as most other kinds of tests, must be written from a definitive
source document, such as specification or requirements document, such as
specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test
provides inputs and responds to outputs without considering how the
software works.

6.3 UNIT TESTING:

Unit testing is usually conducted as part of a combined code and unit


test phase of the software lifecycle, although it is not uncommon for coding
and unit testing to be conducted as two distinct phases.

Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed
• All links should take the user to the correct page.
6.4 INTEGRATION TESTING
Software integration testing is the incremental integration testing of
two or more integrated software components on a single platform to
produce failures caused by interface defects.

The task of the integration test is to check that components or


software applications, e.g. components in a software system or – one step
46

up – software applications at the company level – interact without error.

Test Results: All the test cases mentioned above passed successfully.
No defects encountered.

6.4 ACCEPTANCE TESTING


User Acceptance Testing is a critical phase of any project and
requires significant participation by the end user. It also ensures that the
system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully.
No defects encountered.

You might also like