ollection_MultiFileUpdate.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_MultiFileUpdate

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.

·         Creates 3 different Persistency Service Placement objects, each for a different database file.

·         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, retrieve the event and associated meta data and print it out.

·         Loops over the 3 database files.

·         For each file, loops through new dummy events, creates new data objects, marks them for writing into the given file and adds them and their associated meta data to the collection.

·         Rolls back the last changes made to the collection.

·         Creates a new iterator for the collection.

·         Uses this iterator to loop through all data objects in the collection and verify that the data for the last events added to the collection were erased by the roll back operation.

·         Loops over the 3 database files.

·         For each file, loops through new dummy events, creates new data objects, marks the objects for writing into the given file and adds them and their associated meta data to the collection.

·         Commits the last changes made to the collection.

·         Attempts to roll back the changes made to the collection after they were already committed.

·         Creates another iterator for the collection.

·         Uses this iterator to loop through all data objects in the collection and verify that the new events were successfully added to the collection this time.

·         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. These files will be modified by the test.

·        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 the Collection_MultiFileUpdate 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_MultiFileUpdate

 

  • Compile and link the package:

          % 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_Collection_MultiFileUpdate <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 and written to the collection and the database files in which this information is stored.

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