Skip to content

Latest commit

 

History

History

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README




Document History
Version
Date
Author
Comments
0.1
06/07/05
Augmentum SpikeSource Team 
Initial Draft
1.0
06/10/05
Augmentum SpikeSource Team 
Promote to release

























Summary:

This test archive contains the automated test suite for phpPgAdmin, a web-based database management tool for PostgreSQL.  The package also contains the related documents, including the test plan, test setup documents, as well as the test case specification and issue reports.


Folder Structure:

   ----build
         |
         ------data
         |
         ------testcase
                  |
                  -------Public
                  |
                  -------Common
                  |
                  -------Server
                  |
                  -------Databases
                  |
                  -------Schemas
                  |
                  -------Tables
                  |
                  -------Lang

1.  The "data" folder contains the resources needed in the testing cases

2.  The testing work is divided into 5 parts according to the function areas of phpPgAdmin
    a.  "Public" sets the global env for the testing
    b.  "Common" tests the common functionalities of phpPgAdmin
    c.  "Server" tests the server level functionalities
    d.  "Database" tests the database level functionalities
    e.  "Schema" tests the schema level functionalities
  f.  "Table" tests the table level functionalities
  g.  “Lang” contains the phpPgAdmin language package

The test suite is implemented based on the SimpleTest Framework (v1.0). The phpPgAdmin (3.5.3) application is tested using Apache2 application server and PostgreSQL 8.0.3 database server. The code coverage is measured using spikePhpCoverage (0.6.2).


Run the Test:

To run the test suite, measure code coverage using spikephpcoverage:

To run the test suite, run the following commands assuming that the PHP command line executable is in your path. The following alose assumes that your web server deploy directory is "/usr/local/apache2/htdocs" (Linux), “C:\apache2\htdocs”, simpletest deploy directory is 
"/usr/local/apache2/htdocs/simpletest" (Linux), “C:\apache2\htdocs\simpletest”

Linux:
  # Depoly application
  $ export PHPCOVERAGE_HOME=/usr/local/apache2/htdocs/phpcoverage/src
  $ cp -rp TestphpPgAdmin /usr/local/apache2/htdocs
  # Instrument
  $ php ${PHPCOVERAGE_HOME}/cli/instrument.php -b
    /usr/local/apache2/htdocs/TestphpPgAdmin/phpPgAdmin/
    /usr/local/apache2/htdocs/TestphpPgAdmin/phpPgAdmin/
  # Execute
  $ php coveragephpPgAdminMain.php  
    PHPCOVERAGE_APPBASE_PATH=/usr/local/apache2/htdocs/TestphpPgAdmin/phpPgAdmin/   
    PHP_SIMPLETEST_HOME=/usr/local/apache2/htdocs/

Windows:
  Open a command window, issue the following commands: 
  C:\> set PHPCOVERAGE_HOME= C:\apache2\htdocs\phpcoverage\src
  # Instrument
  C:\> php ${PHPCOVERAGE_HOME}\cli\instrument.php -b C:\apache2\htdocs\phpPgAdmin\ 
       C:\apache2\htdocs\phpPgAdmin\ 
  # Execute
  C:\> php coveragephpPgAdminMain.php PHPCOVERAGE_APPBASE_PATH=C:\apache2\htdocs\phpPgAdmin\ 
       PHP_SIMPLETEST_HOME=C:\apache2\htdocs\


Test Results Summary and Analysis:

   Test Summary:
   There are a total of 1166 assertions in this test suite, 1162 passes, 4 fails and 6 exceptions.

   Fails Analysis:
   1.  One failed case is related to the dropping of databases
       For detailed information, refer to "phpPgAdmin Issue Report" 
   2.  Three failed cases are related to upload files (import data and run sql script file). 
  Currently, SimpleTest1.0 does not support upload files.
       For detailed information, refer to "SimpleTest Issue Report".

   Exception Analysis:
   1.  All six exceptions are related to the Tables module. SimpleTest1.0 cannot handle non-  
       submit button.  For detailed information, refer to "SimpleTest Issue Report".
   
   Other issues:
   1.  It is possible that one test case may fail in the Schema/ConversionTest.
       Typically there should be conversions in the schema pg_catalog in template1, but if        
       there are no conversions, the assertion in our test will fail. We implemented our test  
       based on the normal case.
   2.  Occasionally, if the web server is overloaded, there may be latency, which could cause 
       some assertions to fail
   3.  In addition, PostgreSQL has some limitations. For example, if you already have a psql  
       session running, you cannot create database in another session. If you try, you will get  
       the following message:
         "ERROR:  source database "template1" is being accessed by other users"
    4.    It is possible that one test case may fail in the Database/ProcessesTest.
       Typically there should be no processes in the process list page, but if there are many 
       database accesses, there will be processes in the list. The assertion in our test will  
       fail. We implemented our test based on the normal case.