Professional Documents
Culture Documents
Using The Chariot T Clap I
Using The Chariot T Clap I
Methodology/Approach
We begin by describing the tools necessary to create and execute TCL scripts. Next, we examine the
criteria for creating a test. And finally, we look at a full example and cover it in moderate detail.
The Environment
As with any application development, you must first prepare your development environment. The
development environment consists of three things:
1. TCL Software Distribution
2. NetIQ Chariot TCL Library (Chariot is required to actually run the test)
3. Text Editor.
First, you need TCL, the Tool Command Language first developed by Sun Microsystems, and later
spun off as a startup company called Scriptics. The software is available free from
dev.scriptics.com/software/tcltk/8.0.html. Download TCL version 8.0.5 executable and follow the
installation instructions. The installation associates all files with .tcl and .tk file extensions with
the TCL interpreter. By naming your TCL scripts with a .tcl or .tk file extension, a simple doubleclick on a TCL script file will start execution.
Next, install the NetIQ Chariot TCL programming library, which is on the Chariot CD-ROM. Simply
copy the entire TCL library directory to a convenient place on your computers hard drive, such as
the directory where NetIQs Chariot is installed.
The last item you need is a text editor. You may use any editor that can write a plain text file. In
addition to many commercial editors, you may use notepad or wordpad, which are available with
the Microsoft Windows NT/2000 installation.
Goals Achieved
The goal of this application note is to demonstrate how easy it is to use the Chariot TCL API to create
and run a simple Chariot test. You will find that even a novice programmer will have no difficulty
creating a TCL script that will generate the same valuable results that are available from the GUIbased Chariot console.
Create a Test
Creating a test is very straightforward.
set mytest [chrTest new]
You now have a variable, mytest, which contains the handle, or identifier, of the new test. It is then
good practice to assign a filename to which the test configuration and results can be saved.
chrTest set $mytest FILENAME d:/netiq/results.tst
set
set
set
set
$mypair
$mypair
$mypair
$mypair
Next, you must specify the application script name. This is not the name of the TCL script; it is the
name of the Chariot application script. These script files have a .scr extension and fully specify the
traffic flow between two endpoints in a pair. You must supply the complete path to the application
script file.
chrPair useScript $mypair d:/netiq/Chariot/scripts/filesnds.scr
Lastly, you must add the pair to the test.
chrTest addPair $mytest $mypair
With the test defined and a pair associated with it, you are now ready to run the test.
set done
set
set
set
set
$mypair
$mypair
$mypair
$mypair
Conclusions
With a few lines of TCL, you can create a powerful test script that can fully automate tasks usually
performed using the Chariot console. For more information on the TCL commands available, refer to
the Chariot Programming Reference on the Chariot CD-ROM and in the Chariot Online Help. For
more sample TCL scripts, refer to the SDK directory on the Chariot CD-ROM.
This application note was created by James E. Robinson, III. James is a Senior Technical Staff Member
of North Carolina State Universitys Centennial Networking Lab in Raleigh, NC.
Technical assistance was provided by Scott Kavanaugh.