Blame | Letzte Änderung | Log anzeigen | RSS feed
===================HOW TO TEST PEAR DB===================INTRODUCTION============These are instructions for testing PEAR DB on a Windows machine using aCygwin Bash shell. Adjust the paths and commands to match your system.This configuration is used because these precise steps are known to work.NOTE: You must log on as a user which has permissions to modify thecontents of your PHP executable's directory. This is necessary for bothconfiguring AND running the test system.INSTALLATION============Obtain PHP's Test Framework---------------------------If you don't have PHP's test framework, you need to obtain it. Thesesteps include changing the working directory, downloading run-tests.phpvia SVN and copying the file into place. Change the branch in theSVN command as appropriate for your present version of PHP.cd c:/progra~1/phpsvn checkout \https://svn.php.net/repository/php/php-src/branches/PHP_5_3/run-tests.phpObtain DB and its Test Framework--------------------------------* IF PEAR DB IS ALREADY INSTALLED:If you have PEAR DB installed already, good. The test suiteis in place. Open up a command/shell prompt and move intothe test directory.cd <path to pear insall>/tests/DB/tests* VIA A NEW INSTALLATION USING THE PEAR INSTALLER:Installing PEAR has gotten fairly easy. Follow the instructionsfrom the manual: http://pear.php.net/manual/en/installation.phpOnce PEAR and DB are installed, move to the test directory.cd pear/tests/DB/tests* VIA SVN:Create a location to store the test installation of DB and itstest scripts.d:mkdir peartestsvn checkout https://svn.php.net/repository/pear/packages/DB/trunk peartestcd peartestWe assume you already have the PEAR base package installed. Ifyou don't, you will need to do so, but the instructions fordoing that are beyond the scope of this document. Seehttp://pear.php.net/manual/en/installation.php for more info.Move to the test directory.cd pear/DB/testsCopy the Starter Shell Script and Edit the Paths------------------------------------------------To make starting up each test run easier, we have included two shellscripts. The original files are named "run.cvs". They need to berenamed to "run" so SVN won't bother you with tracking them. Then,the paths and file names in them need to be set to those used byyour system.cp run.cvs runchmod 755 runvi runcd drivercp run.cvs runchmod 755 runvi runCopy the Setup File and Edit the DSN's--------------------------------------The test suite contains a file in the driver directory that storesthe DSN's needed to connect to your database. Then you'll need toedit the DSN's in it.vi setup.incRUN THE TESTS=============To run all tests: ./runTo run one test: ./run <test file name>Example: ./run db_parsedsn.phptTest Types and Locations------------------------tests Common PEAR DB teststests/driver Common tests for all the driversResults and What To Do With Them--------------------------------Each test that fails generates a .php (which you can execute), a .exp(the expected output), a .out (the test output) and a .diff (a diff -ufrom the .exp and .out files).If you run the tests, please report or fill the TEST CONFORMANCE tablein the STATUS document. Before any commit to SVN be sure to run thetests and nothing got broken with the change.If you get the message "SKIP", means that the test it's not executed.Look at the DB/tests/driver/skipif.inc to see what's the problem(probably a connection problem).DB TESTER MATRIX================fbsql ifx mssql mysqli odbc sqliteTESTER dbase | ibase | msql | mysql | oci8 | pgsql | sybaseJohn Horton - - - X - - - - - - - - -Tim Zickus - - - - - - - - X - - - -Tim Parkin - - - - - - - - X - - - -Paul Gardiner - - - X - - - - - - - - -peterwb@iafrica.com - - - X - - - - - - - - -Daniel, Adam - - - - - - - - X - - - -szii@sziisoft.com - - - - - - - - - X¹ - - -jmh3@linuxfreak.com - - - - - - - - - - X - -Kevin Henrikson - - - - - - - - X - - - -Stig Bakken - - - - - - X - - - X - -Chuck Hagenbuch - - - - - X - - - - - - -Ludovico Magnocavallo - - X - - - - - - - - - -Daniel Convissor X X X - X X X X X X² X X XMISSING TESTERS - - - - - - - - - - - - -Comments:[1]: ODBC using IBM DB2[2]: ODBC using IBM DB2 and MS Access