README 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ------------------------------
  2. strongSwan Integration Tests
  3. ------------------------------
  4. Contents
  5. --------
  6. 1. Building the testing environment
  7. 2. Starting up the testing environment
  8. 3. Running the automated tests
  9. 4. Manual testing
  10. 1. Building the testing environment
  11. --------------------------------
  12. The testing environment can be built with the "make-testing" script after
  13. adjusting the variables in the testing.conf file. By default everything is
  14. built when executing the script. Setting any of the ENABLE_BUILD_* variables
  15. in the configuration file to "no" will not build those parts.
  16. 2. Starting up the testing environment
  17. -----------------------------------
  18. When the strongSwan testing environment has been put into place by running
  19. the "make-testing" script you are ready to start up the KVM instances by
  20. executing the "start-testing" script.
  21. 3. Running the automated tests
  22. ---------------------------
  23. The script
  24. ./do-tests <testnames>
  25. runs the automated tests. If the <testnames> argument is omitted all tests
  26. are executed, otherwise only the tests listed will be run as shown in the
  27. example below:
  28. ./do-tests ikev2/net2net-psk ikev2/net2net-cert
  29. Each test is divided into the following phases:
  30. * Load the test-specific guest configuration if any is provided.
  31. * Next the "pretest.dat" script found in each test directory is executed.
  32. Among other commands, strongSwan is started on the IPsec hosts.
  33. * The "evaltest.dat" script evaluates if the test has been successful.
  34. * The "posttest.dat" script terminates the test e.g. by stopping
  35. strongSwan on the IPsec hosts. It is also responsible to cleaning up
  36. things (e.g. firewall rules) set up in "pretest.dat".
  37. * Restore the default configuration on every host (new files have to be
  38. deleted manually in "posttest.dat").
  39. The test results and configuration files for all tests are stored in a
  40. folder labeled with the current date and time in the $TESTRESULTSDIR directory.
  41. The same results are also automatically transferred to the Apache server
  42. running on guest "winnetou" and can be accessed via the URL
  43. http://192.168.0.150/testresults/
  44. 4. Manual testing
  45. --------------
  46. Instead of running tests automatically with "do-tests" it is possible to
  47. preload a test scenario with the script:
  48. scripts/load-testconfig <testname>
  49. Individual configuration files can be changed and any command can be executed by
  50. logging into a guest host directly (via SSH or a console window). No password
  51. is required to login as root. The sources for every software built during
  52. "make-testing" are mounted at /root/shared/, which allows you to change and
  53. recompile these components.
  54. After you have finished testing, the default configuration can be restored
  55. with the following command (newly created files have to be deleted manually)
  56. scripts/restore-defaults