Skip to content

Building

ccancellieri edited this page Apr 11, 2013 · 4 revisions

Building

Requirements:

  • Oracle jdk 6
  • Maven 2

Building:

mvn clean install

Testing the library

For each new functionality or new component you need to implement a new JUnit test which atomically test all the getters and setters and generally speaking all the added functionality.

Integration

Since this is a library used to connect components, you also have to implement integration tests to test how developed features are working with other components (f.i. GeoServer).

Most of the developers may don't want to test all of the available integration so you need to explicitly enable them:

When building, geoserver all the integration test requires a running GeoServer instance.

The tests are destructive, so, by default, these tests will be skipped.

In order to enable the integration test, you have to enable and define some environment variables:

  • gsmgr_resttest set to {{{true}}} to have the test run.
  • gsmgr_resturl the URL where the target geoserver can be found -- default "http://localhost:8080/geoserver"
  • gsmgr_restuser the username for logging into geoserver -- default "admin"
  • gsmgr_restpw the password for logging into geoserver -- default "geoserver"

e.g.

     mvn clean install -Dgsmgr_resttest=true

will run build the lib and run the test on a default GeoServer installation running at {{{http://localhost:8080/geoserver}}}

Develop integration tests:

To understand how to extend or create a new integration test, please take a look to GeoserverRESTTest for geoserver and StoreIntegrationTest (with all of its implementation PostGis, ArcSDE, Oracle,...) for a store based integration test.