$Id: TEST.xml,v 1.2 2006/08/03 11:39:12 badino Exp $
Table of Contents
Abstract
This document describes the procedures that should be followed to execute the unit tests for the gLite Data Transfer ProxyRenewal module
The gLite Data Transfer ProxyRenewal module provides trhe following unit tests:
ProxyRenewal library
ProxyRenewal Agent
In order to execute these tests, the following preconditions should be met:
A MySQL server is neede. Its host name should be provided by property mysql.hostname in the glite.build.properties file in your HOME directory. The name of the Database to use should be specified by the property mysql.dbname and the username and the password of a user able to access the DB should be stored under mysql.username and mysql.password. In case the location of the MySQL server is "localhost", you can specify the mysql socket using the property mysql.socket.
A Oracle 9i or 10g server server installed. The username and password of user able to access the DB should be stored under the properties oracle.username and oracle.password in the glite.build.properties file in your HOME directory, as well as the Oracle ConnectString (oracle.connectstring). In case you need to resolve TNS Oracle symbols, you'll need also to set the TNS_ADMIN environment variable into the property oracle.tns_admin.
A MyProxy Server should be available at the host specified by the property myproxy.server.renewal in the glite.build.properties file in your HOME directory, and a certificate should be uploaded to that server for the user which DN is specified by the property myproxy.user.dn. A valid certificate shuold be created in this MyProxy Server so it can be renewed by the certificate used to run the test (by default is the your proxy).
A Proxy Certificate should be available at the location specified by the property my.proxy.cert in the glite.build.properties file in your HOME directory.
A VOMS Proxy Certificate should be available at the location specified by the property my.voms-proxy.cert in the glite.build.properties file in your HOME directory.
In order to perform the test, you can invoke:
ant test-proxyrenewal ant test-proxyrenewal-agent
or you can also use
ant test-all
to execute them 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 displaied using the format common to all the xUnit frameworks.
Before executing each unit test, the corresponding ant target will install all the required files into the WORKSPACE/stage/test/glite-data-transfer-proxyrenewal folder. Those files are:
Test application use ServiceConfiguration and the requested files are installed under the etc folder. Since these files need to contain some information depending on the deployment, these are not hardcoded but generated starting from the properties set in ~/glite.build.properties, has explained above. In order to generate the configuration of the test application, the config templates exported by the module in $(GLITE_LOCATION)/share/config/glite-data-transfer-proxyrenewal/config-templates are used.
These files are the scripts to create and populate the table on the Database and sone other script that can be used to return an expected value. They are installed under the bin 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-proxyrenewal, 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-proxyrenewal -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 parameter may be required. In order to get these details, you can run the test application with the -h option