strongswan/testing
Tobias Brunner f3bb1bd039 Fixed common misspellings.
Mostly found by 'codespell'.
2011-07-20 16:14:10 +02:00
..
hosts Fixed common misspellings. 2011-07-20 16:14:10 +02:00
images add additional scenario diagrams 2008-08-06 20:35:42 +00:00
scripts added ITA Scanner IMC/IMV pair which detects open server ports on TNC clients 2011-07-04 21:40:25 +02:00
tests Fixed common misspellings. 2011-07-20 16:14:10 +02:00
.gitignore added .gitignore files, ready for the switch 2009-04-30 07:42:30 +00:00
INSTALL version bump to 4.5.1 2010-10-29 09:30:57 +02:00
Makefile.am Added ssh_config to distribution. 2010-10-14 15:58:26 +02:00
README removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
do-tests.in output strongswan.conf and daemon.log on RADIUS hosts with strongSwan IMV 2011-06-01 21:38:03 +02:00
make-testing removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
ssh_config testing: Reduce testing runtime by reusing SSH sessions. 2010-10-14 14:01:26 +02:00
start-testing removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
stop-testing removing svn keyword $Id$ from all files 2009-04-30 13:19:35 +00:00
testing.conf added ITA Scanner IMC/IMV pair which detects open server ports on TNC clients 2011-07-04 21:40:25 +02:00

README

                 ------------------------------------
	          strongSwan UML - Running the Tests
                 ------------------------------------


Contents
--------

   1. Starting up the UML testing environment
   2. Running the automated tests
   3. Manual testing


1. Starting up the UML testing environment
   ---------------------------------------
  
When the strongSwan UML testing environment has been put into place by
running the "make-testing" script then you are ready to start up the
UML instances by calling

    ./start-testing <hosts>
    
This main script first calls the subscript

    scripts/start-switches

that starts the three UML switches umlswitch0, umlswitch1, and umlswitch2
which are connecting the UML instances among each other and via tun/tap
devices also make them accessible from the host system.
      
Then depending on the setting of the UMLSTARTMODE variable defined
in "testing.conf", the UML instances given on the command line are started
up with different terminals:

If you are running the KDE graphical environment then by setting

    UMLSTARTMODE=konsole
    
the script

    scripts/kstart-umls <hosts>
     
is called which starts up each of the UML instances defined by <hosts> in
a KDE konsole. If

    UMLSTARTMODE=xterm

is set then
 
    scripts/xstart-umls <hosts>
    
starts up the UML instances in an xterm each. And with the choice

    UMLSTARTMODE=screen
   
the instances are started up by

    scripts/start-umls <hosts>
    
in the background but the Linux command "screen -r <host>" can be used to
connect a terminal to the UML instance <host> if desired.


    if [ $ENABLE_DO_TESTS = "yes" ]
    then
        do-tests
    fi

either executes all the tests defined in the "testing/tests" directory
if the variable SELECTEDTESTSONLY in "testing.conf" is set to "no" or the
selected tests defined by the string in SELELECTEDTESTS if SELECTEDTESTSONLY
is set to "yes".

    if [ $ENABLE_STOP_TESTING = "yes" ]
    then
        stop-testing <hosts>
    fi

stops the both the UML switches and the UML instances designated by the
<hosts> argument.


2. Running the automated tests
   ---------------------------

The script

    ./do-tests <testnames>

runs the automated tests. With an empty <testnames> argument the tests
as defined in "testing.conf" are executed, otherwise the tests enumerated
by the <testnames> argument will be run as shown in the example below.

    ./do-tests net2net-psk net2net-cert

Each test is divided into the following phases:

    * scripts/load-testconfig <testname>
      loads the UML hosts with test specific settings if such are provided.
      
    * next the "pretest.dat" script found in each test directory is executed.
      Among other commands, strongSwan is started on the IPsec hosts.

    * the "evaltest.dat" script evaluates if the test has been successful.
      
    * the "posttest.dat" script terminates the test e.g. by stopping
      strongSwan on the IPsec hosts.

    * scripts/restore-defaults <testname>
      restores the default settings on the UML hosts.

The test results and configuration settings for all tests settings are stored
in a folder labeled with the current date in the directory
  
    ~/strongswan-testing/testresults
     
the same results are also automatically transferred to the Apache server
running on UML instance "winnetou" and can be accessed via the URL

    http://192.168.0.150/testresults/


3. Manual testing
   --------------
   
The greates flexibility can be achieved with manual testing. Just set
   
    ENABLE_DO_TESTS="no"
    ENABLE_STOP_TESTING="no"
       
in "testing.conf" and start the UML instances that you want to experiment with
by calling

    ./start-testing <hosts>
    
If you want to preload a test scenario with configurations differing from
the default values, e.g. when using Preshared Keys then you can do this
with the command

    scripts/load-testconfig net2net-psk
    
You can then log onto any UML instance using its konsole, xterm or screen
terminal as root with the default password

    tuxmux
    
You can then execute any commands the UML instances, including changing
and recompiling the strongSwan source code located in the /root directory.

After you have finished testing, the default configuration settings can
restored with the command

    scripts/restore-defaults net2net-psk


-----------------------------------------------------------------------------