How to use

Prerequirements: it is assumed that, before starting the test procedure described here below, you have compiled SpagoBI 1.6.0 and external packages with Maven 1.0.2.

After download of SpagoBITest-src-1.2.zip from SpagoBI Project download site, unzip it in the same folder where you put the source code of SpagoBI 1.6.0 and other packages; in this way you will have SpagoBIProject, SpagoBIUnitTests, QbeCore and all other external packages folders in the same folder. In the following we will refer to this folder as “base directory”.
Before starting the test, you have to prepare your environment. In the first step you have to configure the test properties files to see the HSQLDB testing database, that is the default. The files involved in this operation are: You need to udpate the uri with the absolute path where the folder HSQLDB was unzipped (you have only to type the base directory in both files where requested).
[ Note: If you want to run tests on your own database, you need the following files for setting up your database connection: You must set here your database driver class and version, SQL dialect, user, password, uri and mapping classes. Please consider that the default version uses HSQLDB and the file SpagoBIUnitTest/src/conf/spagobi/spagobi.xml refers to SpagoBIUnitTest/src/hibernate.cfg.hsql.xml, that is the Hibernate configuration file for HSQLDB: for this reason, after having modified SpagoBIUnitTest/src/hibernate.cfg.xml for your database requirements, remember to change the reference in SpagoBIUnitTest/src/conf/spagobi/spagobi.xml.
In SpagoBIUnitTest/src folder you find Hibernate configuration files for Oracle, PostgreSQL and MySQL as sample, and in SpagoBIUnitTest/SQL_scripts folder the scripts for tables creation in those databases.]

You need also to configure the CMS: in SpagoBIUnitTest/src/jackrabbit.properties you have to configure the folder in which the CMS will be installed and also the absolute path of the zip file for the CMS re-initialization. Proceed as follows: Finally digit maven test-launch from the command line at the base directory.
Maven will resolve all the dependencies, compile test classes, run tests and produce the junit reports for both SpagoBI and QbeCore tests. After Maven script execution, you can see an overview-summary of test-results in files SpagoBIUnitTests/target/docs/junit-report.html (for tests on SpagoBI) and in QbeCore/target/docs/junit-report.html (for tests on QbeCore). You must pay attention to the fact that, if a test involving CMS is abruptly interrupted, CMS environment should be restored to avoid further test failures. So, before re-starting the tests, you have to delete the content of the folder SpagoBIUnitTests/jackrabbitRepositoriesForTest/spagobi_demo and then re-starting maven test-launch command.

Project's dependancies

The following is a list of dependencies for this project. Maven will try to resolve them automatically.
Dependencies required to compile the application: Dependencies required to run the application: