Re: DB backend status

From: Date: Thu, 07 Dec 2000 08:15:36 +0000
Subject: Re: DB backend status
References: 1 2  Groups: php.pear 
Request: Send a blank email to php-pear+get-597@lists.php.net to get a copy of this message
Ricardo Sada wrote: > > Hello ! > > Could anyone explain me what a "regression test" is. > > I'm considering PEAR's DB backends among others like PHPLIB for use in a > project using MySQL > and problably Postgress in the future.I'd like to know whether it is > important (in terms of stability) or not to use a DB backend that has gone > through this stage. Regression tests are (usually automated) programs or code that test a component by comparing the output given a known input. Such tests are written by developers to confirm that their code works, and so the developer is notified if one change breaks something else (provided he always runs "make test" before committing). There is one programming "methodology" called Extreme Programming (XP) that uses such tests to actually define whether a feature exists. If you can't test it, it doesn't exist, XP says. XP also wants you to write the test before or at the same time as writing the code. If you run "make test" from the pear/ directory, you will run all the tests that are written for PEAR. For MySQL you'll notice this: Running tests in pear/DB/tests/mysql ==================================== DB_mysql::connect test ... passed DB_mysql fetch modes test ... passed DB_mysql::simpleQuery test ... passed DB_mysql::numCols test ... passed DB_mysql::nextId test ... passed DB_mysql::prepare/execute test ... passed DB_mysql::errorNative test ... passed Each of these tests are defined in pear/DB/tests/mysql in the files 001.phpt .. 007.phpt. The format is described in tests/README. - Stig

« previous php.pear (#597) next »