            gLite Data Transfer Url Copy Module Testing description

  Paolo Badino

   <[1]Paolo.Badino@cern.ch>

   $Id: TEST.xml,v 1.5 2007/04/18 08:12:49 ptedesco Exp $

   --------------------------------------------------------------------------

   Table of Contents

   [2]Unit Tests

   [3]UnitTest common flow

   [4]Test Scripts

                [5]transfer-url-copy-test.sh

   Abstract

   This document describes the procedures that should be followed to execute
   the unit tests for the gLite Data Transfer Url Copy module

Unit Tests

   The gLite Data Transfer Url Copy module provides a set of cases for
   testing the transfers between SRM 1.1 and 2.2 server stub implementations.
   The transfer itself is executed as copy between two local files

   In order to execute these tests, the following preconditions should be
   met:

     o You need to have a valid proxy. This proxy is used by the SRM server
       stubs as well as the client.

     o You need to have a the gLite Data SRM Util CPP module compiled on your
       workspace. This is required since the unit tests make use of the
       configuration files for the SRM stub implementations staged by this
       module.

   In order to perform the tests, you should invoke:

     ant test-all

   Due to the fact that the build server cannot met the preconditions, the
   target "unittest" has not been used.

   All of the tests use CppUnit, so the result will be displayed using the
   format common to all the xUnit frameworks.

UnitTest common flow

   Before executing each unit test, the corresponding ant target will install
   all the required files into the
   WORKSPACE/stage/test/glite-data-transfer-url-copy folder. Those files are:

   Configuration Files

           Test application use ServiceConfiguration and the requested files
           are installed under the etc folder.

   In order to execute the test, the test application would then set the
   environment variable GLITE_LOCATION to
   WORKSPACE/stage/test/glite-data-transfer-url-copy, so the program can
   correctly locate the configuration, as well as the log destination folder.

   Once the setup is completed, the test application is executed with the
   command:

     glite_data_agents_common_test_NAME
       -l WORKSPACE/stage/test/glite-data-transfer-url-copy
       -s

     where
       -l specify the location that will be used as GLITE_LOCATION
     and
       -s will enbable the CompilerOutputFormatter


   Depending of the type of the unit test, additional parameters may be
   required. In order to get these details, you can run the test application
   with the -h option

Test Scripts

   The scripts folder contains additional tests.

  transfer-url-copy-test.sh

   transfer-url-copy-test.sh is a bash script that can used for testing
   transfers.

   When invoked, the script reads a list of endpoints and then performs the
   following operations:

     o Transfer a local file to each endpoint.

     o For each endpoint for which the local transfer succeeded, transfer the
       file to each other endpoint.

     o For each endpoint for which the local transfer succeeded, transfer the
       file to the local host

   The script invokes glite-url-copy redirecting its output to a log file
   named source-to-destination where source and destination are endpoint
   names defined in the endpoints definition list (e.g. local-to-dpm_1). If
   the -c option is used, the soap calls are appended to the log file
   (CGSI_TRACE is enabled and the CGSI_TRACEFILE appended to the logs).

   Log files, unless otherwise specified with the -l option, are saved in
   /var/tmp/transfer-url-copy-test-${USER}/${testDate}/${testTime}, where:

     o ${USER} is the user name.

     o ${testDate} is the date when the test was launched, in the format
       YYYYMMDD (date +%Y%m%d)

     o ${testTime} is the time when the test was launched, in the format
       hhmmss (date +%H%M%S)

   The logs folder will contain:

     o a file named tests_log containing the script output.

     o a folder named completed containing successful transfers log files.

     o a folder named failed containing failed transfers log files.

   Endpoints definitions are read from a file. Each endpoint is specified
   calling the endpoint function with the following parameters:

     o Endpoint name (a symbolic name).

     o Endpoint SRM version. The following values can be used:

       1.1
       2.2

     o Host name.

     o Port.

     o Service Path.

     o SAPath.

   The following example shows the endpoints definition list used by default:

 #!/bin/bash
 endpoint "dpm_cern_v1" "1.1" "lxdpm102.cern.ch"     "8443" "/srm/managerv1" "/dpm/cern.ch/home/dteam"
 endpoint "dpm_cern_v2" "2.2" "lxdpm102.cern.ch"     "8446" "/srm/managerv2" "/dpm/cern.ch/home/dteam"
 endpoint "castor1"     "1.1" "srm.cern.ch"          "8443" "/srm/managerv1" "/castor/cern.ch/grid/dteam"
 endpoint "castor2"     "2.2" "srm-v2.cern.ch"       "8443" "/srm/managerv2" "/castor/cern.ch/grid/dteam"
 endpoint "dcache1"     "1.1" "fledgling06.fnal.gov" "8443" "/srm/managerv1" "/fnal.gov/litvinse/NULL/testers"
 endpoint "dcache2"     "2.2" "fledgling06.fnal.gov" "8443" "/srm/managerv2" "/fnal.gov/litvinse/NULL/testers"
 endpoint "storm2"      "2.2" "ibm139.cnaf.infn.it"  "8444" "/srm/managerv2" "/gin"

   If the script is launched with

 bash$ transfer-url-copy-test.sh -e endpoints_file

   then endpoints definitions are read from endpoints_file. If the script is
   launched with

 bash$ transfer-url-copy-test.sh -s

   the file stub-endpoints-list.sh is used; if none of the above options is
   used, endpoint definitions are read from the file
   default-endpoints-list.sh

   To see a complete list of the available options, launch the script with
   the -h option.

References

   Visible links
   1. mailto:Paolo.Badino@cern.ch
   2. file:///home/condor/execute/dir_2963/userdir/emi.fts.transfer-url-copy/build/doc/TEST.html#id3432658
   3. file:///home/condor/execute/dir_2963/userdir/emi.fts.transfer-url-copy/build/doc/TEST.html#id3432705
   4. file:///home/condor/execute/dir_2963/userdir/emi.fts.transfer-url-copy/build/doc/TEST.html#id3432099
   5. file:///home/condor/execute/dir_2963/userdir/emi.fts.transfer-url-copy/build/doc/TEST.html#id3432108
