PRINCIPLES OF THE TCLTEST MODULE
Many users of Tcl are using it for running applications which test other software, pieces of hardware, configurations, conditions, etc. Naturally, such testing environments require a great number of tests to be formulated, written, managed and run, and to have the results correlated.
It's also natural in such a testing environment for the system to be required to run hundreds or thousands of tests, with most of them being passed and only a few failing. In such a circumstance, the resultant reporting needs to be of a nature that it highlights the failures and summarises or even ignores the successes.
The test command in the tcltest package runs a command or block, and checks that the result is in line with a prediction. If it fails, output is generated with describes what was expected and what actually happened. If it succeeds, little or no feedback is given.
Tests can have constraints applied to them, and can have setup and cleanup operations described as well so that the mechanism can be used to run tests only in certain circumstances, or when there are certain pre-requisite actions performed.
A series of different tests can be developed in separate scripts and then run together as a test suite through a single controlling script, or even interactively - yet the maintenance of each test can remain with the original programmer who formulated the test
See also Tcl training modules
Please note that articles in this section of our
web site were current and correct to the best of our ability when published,
but by the nature of our business may go out of date quite quickly. The
quoting of a price, contract term or any other information in this area of
our website is NOT an offer to supply now on those terms - please check
back via our main web site
Tcl/Tk - The Tcltest Package 
Test framework for TCL - Tcltest - some examples - (2015-03-11)resource index - TclTk
Solutions centre home page
You'll find shorter technical items at
The Horse's Mouth
delegate's questions answered at
At Well House Consultants, we provide
subjects such as Ruby, Lua, Perl, Python, Linux, C, C++,
Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer)
many questions, and answers to those which are of general
interest are published in this area of our site.