"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Data Reference Set


The data reference set provide the ability for GeoServer to be tested online against a database using data provided by GeoScience Victoria. The data is a subset of what is used in the real world. The mapping and test case will ideally try to capture real world usage. This will also provide a backbone to allow testing to be performed on a oracle or postgis database. Currently all unit test performed in GeoServer uses properties file as its data source. Users do not necessarily have to use the data provide and are given the means to provide their own to suit their test case.

Setting up

The test packages are located in GeoServer app-schema-test, org.geoserver.test.onlineTest. To run the test, simply create a postgis.properties and/or oracle.properties file in your {user}/.geoserver folder with the following content:










You may include any other properties that is require for mapping file interpolation in here. This properties file contains information about the database that you would like to run the test against. To run the data reference set test, the postgis.properties and oracle.properties file should contain connection information that connects to it's respective database.

To completely run all the tests, we require 768M of memory else we will encounter stackoverflow exception
Database - Postgis preparation:

Create a empty database using the postgis template. Postgis is an extension for postgres and can be installed via postgres application stack builder.
Database - Oracle preparation:

Create a empty oracle database.

How it works

There are three parts to the internal workings for online testing.
Setting up the data:

Setting up the test data for online testing.


All test data will be clean up and re-uploaded once when tests are ran. The clean up are all done via the sql scripts. The reference data set is package as a artifact on the geotools maven repository and it can be access browsing the repository.


Setting up the data:

Setting up the required files is performed through extending the AbstractAppSchemaMockData class, overriding the addContent method. The mapping file for the test cases can now be group into folders as long as the path to the mapping file is provided. eg.

addFeatureType(GSML_PREFIX, "MappedFeature", "DataReferenceData/gsml_MappedFeature/gsml_MappedFeature.xml")
Bring it all together:

The final step to complete the concoction is to bring it all together.


We have reused the GeoServer test framework extending the AbstractAppSchemaWfsTestSupport to include the necessary data preparation for online testing. DataReferenceWfsOnlineTest contains all the test case and it's subclass makes it specific to the database. If no properties file is found, the tests would be skip.


The data which at this point of writing consist of 2 sql scripts, 1 for oracle and 1 for postgis, which prepares the database and inserts the data. Both data are in sync and are deploy as a maven artifact into the osgeo repository using the following command:

mvn deploy:deploy-file -DgroupId=org.geotools.data -DartifactId=refdataset-1.0 -Dversion=1.0.1 -Dfile=C:\VPrograms\GeoTool\trunk\modules\unsupported\app-schema\app-schema-refdataset\target\refdataset-1.0-1.0.1.jar -Dpackaging=jar -DrepositoryId=osgeo -Durl=dav:http://download.osgeo.org/webdav/geotools/

A dependency has been added to the app-schema-test.


Topic attachments
I Attachment Action Size Date Who Comment
AbstractAppSchema.PNGPNG AbstractAppSchema.PNG manage 8.8 K 03 Nov 2010 - 16:14 VictorTey  
dataSetup.PNGPNG dataSetup.PNG manage 4.1 K 03 Nov 2010 - 15:17 VictorTey  
oracle.propertiesproperties oracle.properties manage 0.3 K 16 Nov 2010 - 16:50 VictorTey  
postgis.propertiesproperties postgis.properties manage 0.3 K 16 Nov 2010 - 16:50 VictorTey  
Topic revision: r6 - 26 Oct 2011, VictorTey

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).