qa:runtests:documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
qa:runtests:documentation [2009/09/01 19:45] zoeqa:runtests:documentation [2009/09/01 20:04] zoe
Line 76: Line 76:
 Each test case is executed in it's own process. Many classes are associated with the execution of a single test case. The following subsections give a brief description of the responsibilities of each class. Each test case is executed in it's own process. Many classes are associated with the execution of a single test case. The following subsections give a brief description of the responsibilities of each class.
  
 +===== Run configuration =====
 +This group of classes is responsible for setting the configuration for the whole test run. So, for example the name of the name of the PHP executable under test is set in this group as is the name of the PHP CGI exectuable.
  
-====== Configuration classes ======+===== Test case configuration ===== 
 +Some settings are specific to each test case and need to be set for a single test. These classes are responsible for settings at the level of individual tests.
  
 +====== Run configuration classes ======
  
 +This sections contains a brief description of each class involved in setting the configuration for the whole test run.
 +
 +==== rtRunTestsConfiguration ====
 +
 +The main class in this section - all of the other classes are related to setting options in the run configuration object. There should be OS dependent instances for unix, windows etc. 
 +
 +==== rtCommandLineOptions ====
 +Instantiated by rtRuntestsConfiguration. Parses the command line options (argv[]) for runt-tests.php
 +
 +==== rtEnvironmentVariables ====
 +Get a list of all of the Environment variable and maintains as an array. This is required both establishing configuration settings and to pass to to proc_open() when PHP code is run as part of a test (see rtPhpRunner and  testcase/sections/executablesections).
 +
 +==== rtAddToCommandLine ====
 +Somewhat bizarrely (to my mind) argv[] for run-tests can be added to using an Environment variable (TEST_PHP_ARGS). This class is instantiated after rtEnviromentVariables and may (if TEST_PHP_ARGS is used) add other options to an instance of rtCommandLineOptions. This is here for compatibility with the old version of run-tests, if no good reason for it comes to light it should go.
 +
 +==== rtIniAsCommandLineArgs ====
 +The run-tests code pre-sets a number of  ini settings automatically, for example  error_reporting. This helps prevent users accidentally picking up different php.ini files which would cause tests to fail. This class maintains a list of ini settings and converts them to -d flags used in teh PHP command line when a test case is run, eg
 +
 +php_exectuable   -d flag1 -d flag2...   test.php   test_arguments
 +
 +Note that these can be added to using the test case section INI. This class is instantiated from the setting class that builds the php command line, it is also instantiated from the rtTestConfiguration class when a test case contains an INI section.
 +rtPreCondition list
 +Maintains a list of all of the pre-conditions that must be satisfied before a test run is attempted. For example - check that a PHP executable has been specified.
 +
 +==== rtPrecondition ====
 +Parent class for the classes that contain code to check for each pre-condition. See subdirectory 'precoditions' for the sub-classes that perform that checks.
 +
 +==== rtSetting ====
 +Parent class for classes that set run configuration settings. See 'setting' directory for sub-classes. Note that run settings can be derived from eith command line options or Environment variables, the functions of teh settings classes is mainly to determine which of these has been used and to set the run configuration accordingly.
  
  
qa/runtests/documentation.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1