HomeDownloadsUser GuideDevelopment

Development: Integration

The original goal of the Integration project was to run integration tests on the OpenPermis code within a continuous integration tool. Once implemented it proved to be a good starting point for integrators to quickly explore the OpenPermis framework.

All the Integration project does is to run tests against the four examples and other classes, but it does so automatically, using short shell and ant scripts and short java test classes, and even starting an LDAP and a EJB server when needed.

This document describes how to set up a local copy of the Integration project an how to run it. Our advise is, before setting up an LDAP or an EJB server on your own, run the Integration project and give a look at its short, insightful scripts and tests!

Checking out Integration

The Integration project only works together with a local development copy of the OpenPermis project. If you dont have yet such a copy get one following the instructions of Setup.

Once you have a local development copy of OpenPermis, you may check out the integration project from the SVN repository.

Anonymous Subversion Access:

svn checkout https://svn.forge.osor.eu/svn/openpermis/trunk/integration

Developer Subversion Access:

svn checkout --username ${USER} https://svn.forge.osor.eu/svn/openpermis/trunk/integration

Alternatively you may of course also use a graphical SVN client or use the SVN repository browser of your favourite IDE (the project repository already contains preconfigured settings for Eclipse).

For the Integration project to work correctly, it has to be in the same directory as the OpenPermis project. In addition, the folder containing the Integration project MUST have the name "integration" and the folder containing OpenPermis MUST have the name "openpermis", just like in the SVN repository. Actually you get this automatically right if you check out the whole trunk at once.

The Integration project takes more than 100mb because it contains a JBoss and an OpenDS.

The scripts running the integration tests require ant. If you don't have it, get it here.

The shell scripts has to be executed within a Unix-style shell. If you are working on Windows you can get and install a Unix-style shell here: http://www.cygwin.com/.

To compile the java test classes you need a Java SE Development Kit which you can find here .

Structure of Integration Project

...
run-integration.sh
src
common
common-ant-targets.xml
generate-certificates.xml
ldap
build.xml
run-ldap-integration.sh
no-server
build.xml
run-no-server-integration.sh
javaee
build.xml
run-javaee-integration.sh
...

Running Integration Project

You can run all the integration tests at once by executing the shell script run-integration.sh at the root of Integration project.

This script takes three arguments:

  1. your user name
  2. the name of your machine
  3. the path to your ant installation.

After having run run-integration.sh you may also run each integration test type individually by going to its src folder (e.g. src/no-server) and running the shell script contained there (e.g. run-no-server-integration.sh). Those scripts only take the path to your ant installation as argument (or just 'ant' if ant is in your PATH).