**********************************************************************
* DISCLAIMER OF WARRANTIES:                                          *
*                                                                    *
* The following enclosed code is sample code created by IBM          *
* Corporation.  This sample code is not part of any standard IBM     *
* product and is provided to you solely for the purpose of assisting *
* you in the development of your applications.  The code is provided *
* "AS IS", without warranty of any kind.  IBM shall not be liable    *
* for any damages arising out of your use of the sample code, even   *
* if they have been advised of the possibility of such damages       *
*                                                                    *
**********************************************************************

Test Framework Samples

Description

The tfwsmpl program implements ITest subclasses for many standard software
tests.

Concept

The Test Framework Samples demonstrate writing software test classes using
the Test Framework. The following table shows the names of the individual
test classes and describes what they test:

  Test name(s)                        What it is/what it tests
  ------------                        ------------------------
  ITestSequenceTest and ITestSetTest  ITestCollection class
  ICompTest1 and ICompTest2           IComparisonTestOf class
  IStrmTest1                          IStreamTestOf class
  IGlobalTest                         global functions
  IInfoTest                           copyInfo and lookupInfo member 
                                      functions of the ITest class
  IInputsTest                         setInputs and copyInputs member 
                                      functions of the ITest class
  IMultiplexerTest                    ITestMultiplexer class
  INothingTest                        a very simple example of the ITest 
                                      class 
  ITestTestRun                        ITest::Run member function
  IStickySuccessTest                  setStickySuccess member function of                                              the ITest class
  IArgumentDictionaryTest             IArgumentDictionary class
  ITieredTextBufferTest               ITieredTextBuffer class
  ISequenceAddTimingTest and ITimingTestTest   ITimingTest class
  IAutoSamplingTest                   auto sampling of ITimingTest class
  IStartStopTimingTestTest            IStartStopTimingTest class


Task

The tfwsmpl program writes output to stdout. Command-line options allow you
to specify the name of the ITest subclass to run, how much detail to show
in diagnostic output (headline, general, normal, detail, Debug), how many
times to run the test (default is 1), the log file to write test output to
(the default is TestLog), and other specific test options.

How To Run the Program

Run tfwsmpl from the command line. To run all of the TESTFW samples, use
the file "samples.cmd":

   samples.cmd > samples.log 2>&1

To run an individual sample, see the file samples.cmd which uses the
following tfwsmpl command line syntax:

   tfwsmpl -t <class> -e <EchoTier> -n <NumberOfRuns> -o <TestArgs...>

    -t[est] <class>           # name of the ITest subclass to be run 
    -e[cho] h|g|n|d|D         # how much detail to show in diagnostic 
                              # output (headline, general, normal, 
                              # detail, Debug) 
    -n <numberOfRuns>         # run test this many times, default is 1 
    -l[og] [filename]         # write test output to filename. If 
                              # filename is not specified, the 
                              # default file name is TestLog 
    -o[ptions] <testArgs...>  # pass further arguments to test 


The following table shows how to run each individual test:

  Test name(s)              How to run it
  -----------               -------------
  ITestSequenceTest         tfwsmpl -t ITestSequenceTest -e D  
  ITestSetTest              tfwsmpl -t ITestSetTest -e d -o foo bar 77
  ICompTest1                tfwsmpl -t ICompTest1  
  ICompTest2                tfwsmpl -t ICompTest2
  IStrmTest1                tfwsmpl -t IStrmTest1
  IGlobalTest               tfwsmpl -t IGlobalTest
  IInfoTest                 tfwsmpl -t IInfoTest
  IInputsTest               tfwsmpl -t IInputsTest
  IMultiplexerTest          tfwsmpl -t IMultiplexerTest -e n  
                            tfwsmpl -t IMultiplexerTest -o -p Apple  
                            tfwsmpl -t IMultiplexerTest -o -p Bear
                            tfwsmpl -t IMultiplexerTest -o -p Cart
                            tfwsmpl -t IMultiplexerTest -o -p Door
                            tfwsmpl -t IMultiplexerTest -o -p Elbow
                            tfwsmpl -t IMultiplexerTest -o -i Door Elbow
                            tfwsmpl -t IMultiplexerTest -o -i Door Apple
  INothingTest              tfwsmpl -t INothingTest  
                            tfwsmpl -t INothingTest -n 100 -e h  
                            tfwsmpl -t INothingTest -e d -n 2 -o abc xyz
  ITestTestRun              tfwsmpl -t ITestTestRun  
                            tfwsmpl -t ITestTestRun -o -exception reset
                            tfwsmpl -t ITestTestRun -o -exception setup
                            tfwsmpl -t ITestTestRun -o -exception test
  IStickySuccessTest        tfwsmpl -t IStickySuccessTest
  IArgumentDictionaryTest   tfwsmpl -t IArgumentDictionaryTest -o -foo 100 -bar
                            fork spoon -ccc 84 -85
  ITieredTextBufferTest     tfwsmpl -t ITieredTextBufferTest
  ISequenceAddTimingTest    tfwsmpl -t ISequenceAddTimingTest -o -s 15 -c 22  
  ITimingTestTest           tfwsmpl -t ITimingTestTest
  IAutoSamplingTest         tfwsmpl -t IAutoSamplingTest -o -at 0.01 -out 14 -w 3
  IStartStopTimingTestTest  tfwsmpl -t IStartStopTimingTestTest -o -c 50 16000 12000 8000

-------------------------------------------------------------------------
Copyright (c) IBM Corporation 1997. 
All rights reserved. 

Permission is granted to copy, use, modify, and merge this software into
your applications and to permit others to do any of the foregoing. You 
must include this permission and copyright notice in all copies and 
modified versions of this software.

