Software Requirements
- Java Development Kit Version 1.4.2_08;
- SpagoBI 1.8.0 and its external packages;
- Maven 2.0.2.
How to use
Prerequirements: it is assumed that, before starting the test procedure described here below, you have compiled SpagoBI 1.8.0 and external packages with Maven 2.0.2 and you have not deleted all the target folders created by Maven 2.
After download of SpagoBITest-src-1.4.zip from SpagoBI Project download site, unzip it in the same folder where you put the source code of SpagoBI 1.8.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”.
The Maven plugin surefire-report-maven-plugin-2.0-beta-1, that produces the html reports, works only with American number format. For this reason you have to:
- in Unix environment: from command line launch:
export LANG=en_US.UTF-8;
- in Windows environment: go to Control Panel, then open International settings and set English [USA] locale.
Tests on SpagoBIProject
Before starting tests, you have to start the database: at SpagoBIUnitTest/HSQLDB folder launch the command start.bat (for Windows users) or start.sh (for Unix users). Don't stop the database before all tests on SpagoBIProject are executed.
[ Note: If you want to run tests on your own database, you need the following files for setting up your database connection:
- SpagoBIUnitTest/src/conf/data_access.xml
- SpagoBIUnitTest/src/hibernate.cfg.xml
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:
- type the absolute path of the base directory in repository_path and in zip_repository_file_for_recovery, where requested.
To run test on SpagoBIProject launch mvn surefire-report:report from the command line inside SpagoBIUnitTest folder (for Unix users: the command must be lanched in the same session in which you have previously launched the export command).
Maven will resolve all the dependencies, compile test classes, run tests and produce the junit reports.
After Maven command execution, you can shutdown the database and see an overview-summary of test-results in file SpagoBIUnitTests/target/html/surefire-report.html.
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 mvn surefire-report:report command.
Tests on QbeCore
To run test on QbeCore move the file Qbe-tests-pom.xml from SpagoBIUnitTest to QbeCore and digit
mvn -f Qbe-tests-pom.xml surefire-report:report
from the command line inside QbeCore folder (for Unix users: the command must be lanched in the same session in which you have previously launched the export command).
After Maven command execution, you can see an overview-summary of test-results in files QbeCore/target/html/surefire-report.html.
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:
- commons-pool-1.2.jar
- dbunit-2.1.jar
- hibernate-3.0.5.jar
- jackrabbit-0.16.4.1-dev.jar
- jcr.1.0.jar
- junit-3.8.1.jar
- portlet-api-1.0.jar
- servlet-api-2.4.jar
- sbi.securityprovider.api-1.8.jar
- SpagoBIProject 1.8 compiled classes
- spago-core-2.0.0.jar
- spagoportlet.jar
Dependencies required to run the application:
- antlr-2.7.5H3.jar
- asm-1.5.3.jar
- asm-attrs-1.5.3.jar
- cglib-2.1_2.jar
- commons-collections-3.1.jar
- commons-dbcp-1.2.1.jar
- commons-fileupload-1.1-dev.jar
- commons-logging-1.0.jar
- commons-validator-1.1.4.jar
- concurrent-1.3.4.jar
- dom4j-1.6.jar
- ehcache-1.1.jar
- geronimo-spec-jta-1.0-M1.jar
- groovy-all-1.0-jsr-03.jar
- hsqldb-1.8.0.1.jar
- jakarta-oro-2.0.8.jar
- jamon-1.0.jar
- log4j-1.2.8.jar
- lucene-1.4.3.jar
- qbe.core-1.8.jar
- sbi.drivers.api-1.8.jar
- sbi.drivers.jasperreport-1.8.jar
- sbi.drivers.jpivot-1.8.jar
- xercesImpl-2.6.2.jar
- xml-apis-2.0.2.jar