"TestCase_Collection_Read.html" Content-Transfer-Encoding: 8bit LCG SPI - TESTING (Test Cases Specifications)

LCG-Application Area
SPI: Software Testing

POOL  

Test Case

 July 10, 2003


Case: Collection_Read

Component

Author

Date

Version

 

Collection

Kristo Karr

07-10-03

1.0.1

Test Case Description

  • Opens an existing collection of data object references and their associated meta data.
  • Retrieves and prints out the meta data list specification.
  • Creates an iterator for the collection.
  • Uses the iterator to loop through all data objects in the collection and for each data object found:

1.      Retrieves and prints out its event data.

2.      Retrieves and prints out its associated list of meta data.

  • Closes the collection.

Pre and Post Conditions

 

Requires the existence of 2 or more files created by a previous call to the Collection_Write executable.

Input/Output Specifications

  • Requires the existence of a database file called TestDbFile.pool which contains the collection’s persistent data.
  • Requires the existence of a file called PoolFileCatalog.xml which contains database file identification information.
  • Requires the existence of a local file (e.g. in the case of a Root collection) or a database table (e.g. in the case of a MySQL collection) containing the collection of data object references and their associated meta data.

Test Procedure

 

 

  • Enter the src directory of your local POOL project area, check out the Collection_Write and Collection_Read packages from the POOL CVS repository, and enter the Collection_Read directory:

          % cd $MyPoolArea/src

    % cvs co –r POOL_<latest release tag> Tests/Collection_Write

    % cvs co –r POOL_<latest release tag> Tests/Collection_Read

 

  • Compile and link the packages:

          % scram build

 

  • Setup the SCRAM runtime environment variables (change csh to sh for Bash shell):

               % eval `scram runtime –csh`

               % rehash

 

  • Run the executables in the following order:

          % test_Collection_Write <collection type>

          % test_Collection_Read <collection type>

 

where presently recognized values for <collection type> in these tests are MySQLCollection, MySQLltCollection, RootCollection and ImplicitCollection.

 

Expected results

A detailed log of program execution will be printed to standard output and will include a listing of each event and meta data entry read from the collection.

Failure Recovery

 

In the event of a program crash please submit a bug report to the POOL project via the Savannah Portal at http://savannah.cern.ch/

Comments

 

Will eventually expand test to cover more collection types.

 


Template version: TEST_testcase-template-00.01 (Draft)
Fri May 16
10:15:58