llection_FileInfoRetrieve.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_FileInfoRetrieve

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 using a server side query.

·         Uses the iterator to loop through all data objects in the collection that satisfy the query 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.

3.      Retrieves its Token identifier.

4.      Uses the Token to retrieve its unique file identification string in the File Catalog and print it out.

5.      Uses the file identification string to retrieve the physical name and type of the database file into which the data object was stored and prints this information out.

6.      Uses the Token to retrieve and print out other useful information like container ID and database technology type.

  • Closes the collection.

Pre and Post Conditions

 

Requires the existence of 4 files created by a previous call to the Collection_MultiFileWrite executable.

Input/Output Specifications .

·        Requires the existence of 3 database files called TestDbFile1.pool, TestDbFile2.pool and TestDbFile3.pool which contain 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 associated meta data.

Test Procedure

 

 

  • Enter the src directory of your local POOL project area and check out the Collection_MultiFileWrite and Collection_FileInfoRetrieve packages from the POOL CVS repository:

          % cd $MyPoolArea/src

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

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

 

  • 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_MultiFileWrite <collection type>

          % test_Collectioin_FileInfoRetrieve <collection type>

 

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

 

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 and information about the particular database file into which they were written.

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