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:42] zoeqa:runtests:documentation [2009/09/01 19:49] zoe
Line 61: Line 61:
  
 ====== Overall code structure ====== ====== Overall code structure ======
 +The most important classes in classes in the code are shown in the figure below and described in the following paragraphs.
 +
 {{:qa:runtests:mainclasses.png|}} {{:qa:runtests:mainclasses.png|}}
  
Line 78: Line 80:
  
  
 +==== 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