Spirenttestcenter, the United States think Bollen Company's network testing instruments, covering the Ethernet L2~L7 layer, the use of the most powerful instrument.
Automated test scenarios for 1.SpirentTestcenter
Test the at frame on the PC---->TCL Driver Library SIG_TEQ_STC.TCL (load Spirenttestcenter Library)-----(Ethernet cable)----->STC Chassis
STC's Chassis internal command is also TCL format, but there is a disadvantage in debugging, script execution effect can not be immediately reflected in the Spirent testcenter application Client interface, observation results.
2.SpirentTestcenter TCL API Organization structure
Spirent Testcenter All of the features available on the GUI have a corresponding API interface, its API organization is object-oriented, and provides support for multiple languages such as Tcl Java Perl Ruby C + +.
3.Spirent testcenter TCL API approximate format
The STC API uses a series of command/function to manipulate object, which is the chassis object handle generated internally by the handle, which exists throughout the process.
Command format:
functionname Objecttype/objecthandle/ddnpath attributename (AttributeName must start with "-") Attrnamevalue (attribute name value)/ Danpath [Value]/relationreference
Eg: (above three cases)
stc::create Project
Stc::get $project _handle
Stc::create project.port/stc::get $project _handle. Port
Stc::get $port-location/stc::get $port-active-location
Stc::config $port-active false-location "//10.1.1.1/1/1"
Stc::create $streamblock-under $port-frameconfig ""-ethernet. Ethernetii.ethertype 880b/stc::config $project-port.active false/stc::get $project-port.active
Stc::get $port 1-children (children is a pair of related object properties)
There are also some commands that are directly followed by specific values, such as:
stc::connect//172.168.1.1 stc::reserve//172.168.1.1/1/1 stc::sleep 5
How path is represented:
direct-descendant Notation (DDN) direct descendant symbol
descendant-attribute Notation (DAN)
indexed Notation (DDN and DAN)
eg
Stc::config $project. Port-active false-location "//10.1.1.1/1/1"
Stc::config $project-port (1). Active False-port (2). Active false
Set enabled [Stc::get $port 1-streamblock (2). Enablecontrolplane]
The basic commands are stc::xxx, where STC:: represents the STC namespace to differentiate acknowledgment functions, and function names are lowercase, object names and property names are not case-sensitive
The usual "XXX" has the following:
Apply all configuration-related command stc::apply
Config
Connect
Create
Delete
Disconnect
Get
Help
Log
Perform
Release
Reserve
Sleep interpreter stops executing for some time
Subscribe
Unsubscribe
Waituntilcomplete
4. Some STC at time considerations
(1) STC's client Spirent Testcenter application after the installation is complete, there is a. TCL library file that defines the STC chassis internal TCL command:
c:/program files/spirent communications/spirent testcenter 3.55/spirent testcenter Application/ SPIRENTTESTCENTER.TCL.
This library file needs to be written to the PKGINDEX.TCL in the TCL package directory so that the TCL library can be found and loaded in the Sig_teq_stc.tcl file by "packages require Spirenttestcenter"
(2) Spirent testcenter application do not have their own TCL interrupt, so the operation of STC can use any TCL interrupt, as long as the use of the library files are loaded can
This article is simply an introduction to the Spirent Testcenter Automation principle, the detailed Spirenttestcenter TCL API can be found in the specific API official documentation.
Automation of the Spirenttestcenter tester