Getting Started with Grouper Provisioning Tests in Eclipse
To test provisioning from Grouper to LDAP or from LDAP to Grouper, you will need a working Grouper API installation and an LDAP DSA.
These instructions assume that you have the Grouper and provisioning projects in your Eclipse workspace, and that you are using Maven to build Grouper. See Grouper Development Environment Using Maven.
Getting Started with the Grouper API
Start HSQL or configure a database for Grouper. The following example is for PostgreSQL.
If you configure a database, whitelist the db connection. Since we are using maven instead of ant, Grouper will warn regarding jarfile mismatches. You may wish to turn off these warnings.
PostgreSQL requires a modification to
conf/sources.xml, scroll down until you see the following and cut & paste the correct SQL.
Logging to stdout may be helpful, add
grouper_stdout to the
The Grouper database needs to be initialized. I usually run
edu.internet2.middleware.grouper.app.gsh.GrouperShell via a right-click and select
Run As ->
Java Application. This will fail since the Grouper database has not been initialized. I copy the
GrouperShell run configuration via the menu
Run Configurations..., add the
-registry -runscript argument, and run this new run configuration.
Running the original
GrouperShell run configuration should result in a
The Grouper API installation is now ready.
Getting Started with Provisioning Tests
There are several example provisioning projects, named
Configuration files are located in the
src/test/resources directory. Please note that when running tests from the
psp-example-* projects, the
src/test/resources directory takes classpath precedence over the
grouper/conf directory. For the curious, the configuration files in
src/test/resources are included in the psp distribution.
The Apache Directory Studio plugin to Eclipse, available via the Eclipse Marketplace, is helpful when testing LDAP provisioning.
Test Provisioning from Grouper to LDAP
psp-example-grouper-to-ldap project tests provisioning from Grouper to LDAP.
ldap.properties appropriately for your LDAP server.
All ldap entries under
edu.vt.middleware.ldap.base will be deleted during testing !
Run As ->
Java Application or
src/test/resources/data directory contains ldif and xml files. The ldif files are used to initialize the LDAP directory for testing or to verify that the LDAP directory was correctly provisioned. The xml files are used to verify that the psp returned the "correct" SPMLv2 responses. "Correct" is in quotes since some psp messages are custom and outside of the SPMLv2 specification, for example, CalcRequest, DiffRequest, SyncRequest, etc.