#OnEarth CI Test Scripts
This directory contains files and scripts to test various aspects of OnEarth. The included tests are:
test_mod_onearth.py
-- tests the OnEarth Apache module (requiressudo
)test_mod_oems.py
-- tests the mod_oems and mod_oemstime modules (requiressudo
)test_layer_config.py
-- tests the Layer Config tooltest_mrfgen.py
-- tests MRFgentest_vectorgen.py
-- tests oe_vectorgentest_legends.py
-- tests the oe_generate_legend tool with GIBS colormaps
##Setup These tests assume that OnEarth and its associated utilities are installed. Test files for mod_onearth tests must be copied to a directory that Apache has permission to access.
The tests have additional dependencies from the rest of OnEarth. To install the Python dependencies required by the test scripts, run sudo pip install -r requirements.txt
.
##Running the Tests
Each test script will output a JUnit XML results file. By default, these files are named test_layer_config_results.xml
and test_mod_onearth_results.xml
. A different output filename can be specified with the -o
option, i.e. sudo python test_mod_onearth.py -o output_file.xml
.
Note that the included mod_onearth_test_data/twms_endpoint/kmlgen.cgi
has been compiled for use in CentOS 6. It may need to be recompiled for other systems. For more information, see OnEarth Endpoint Configuration.
Note also that the mrfgen tests involve the downloading and processing of imagery, so they may take a while to complete. You may experience 'out of memory' errors if running these tests in a VM without enough memory configured.
###Additional Test Options ####test_mod_onearth.py
-d, --debug
-- This will output verbose messages on the test operations to the output file.-s, --start_server
-- This will load the test Apache configuration for manual testing purposes (normally the script deletes it when the tests are over.)
####test_mod_oems.py
-d, --debug
-- This will output verbose messages on the test operations to the output file.-s, --start_server
-- This will load the test Apache configuration for manual testing purposes (normally the script deletes it when the tests are over.)
####test_layer_config.py
-d, --debug
-- This will display verbose messages about the files the script is creating and text it's searching for in the config tool output files.
####test_mrfgen.py
-d, --debug
-- This will display verbose messages about the files the script is creating and text it's searching for in the config tool output files.
####test_vectorgen.py
-d, --debug
-- This will display verbose messages about the files the script is creating and text it's searching for in the config tool output files.
####test_legends.py
-d, --debug
-- This will display verbose messages about the files the script is creating and text it's searching for in the config tool output files.
##List of test_layer_config tests:
- Configure a static layer for WMTS
- Configure a daily layer with no year for WMTS
- Configure a daily layer with year for WMTS
- Configure a sub-daily layer with year for WMTS
- Configure a daily layer with year and z-level times for WMTS
- Configure a daily layer with no year and z-level times for WMTS
- Configure a static layer for TWMS
- Configure a daily layer with no year for TWMS
- Configure a daily layer with year for TWMS
- Configure a sub-daily layer with year for TWMS
- Configure a daily layer with year and z-level times for TWMS
- Configure a daily layer with no year and z-level times for TWMS
- Check empty tile
- Generate vertical legend from Classification color map
- Generate horizontal legend from Classification color map
- Generate vertical legend from Continuous color map
- Generate horizontal legend from Continuous color map
- Generate vertical legend from Discrete color map
- Generate horizontal legend from Discrete color map
- Generate vertical legend from Mixed Discrete/Continuous w/ Classification color map
- Generate horizontal legend from Mixed Discrete/Continuous w/ Classification color map
- Generate vertical legend from Multiple Discrete/Continuous color map
- Generate horizontal legend from Multiple Discrete/Continuous color map
- Continuous daily period detection
- Intermittent daily period detection
- Continuous multi-day period detection
- Intermittent multi-day period detection
- Continuous sub-daily “legacy” period detection
- Intermittent sub-daily “legacy” period detection
- Z-level period detection
- Continuous monthly period detection
- Intermittent monthly period detection
- Continuous yearly period detection
- Intermittent yearly period detection
- Generate empty tile
- Support for versioned color maps
##List of mod_onearth tests:
- Request current (no time) JPEG tile via WMTS
- Request current (no time) PNG tile via WMTS
- Request current (time=default) JPEG tile via WMTS
- Request current (time=default) PNG tile via WMTS
- Request current (no time) JPEG tile via TWMS
- Request current (no time) PNG tile via TWMS
- Request tile with date from “year” layer via WMTS
- Request tile with date from “non-year” layer via WMTS
- Request tile with date and time (sub-daily) from “year” layer via WMTS
- Request tile with date and time (z-level) from “year” layer via WMTS
- Request tile with date and time (z-level) from “year” layer via TWMS
- Request tile from static layer with no time via WMTS
- Request tile with date via TWMS
- Request tile with date via KML
- Request WMTS GetCapabilities
- Request TWMS GetCapabilities
- Request TWMS GetTileService
- URL Parameter Case Insensitivity
- URL Parameter Reordering
- WMTS Error handling
- WMTS REST requests
####Date Snapping Tests
-
Regular Daily date (P1D)
a. 2015-01-01/2016-12-31/P1D
i. 2015-01-01 -> 2015-01-01 ii. 2015-01-02 -> 2015-01-02 iii. 2016-02-29 -> 2016-02-29 iv. 2017-01-01 -> Blank Tile
b. 2015-01-01/2015-01-10/P1D, 2015-01-12/2015-01-31/P1D
i. 2015-01-01 -> 2015-01-01 ii. 2015-01-11 -> Blank Tile iii. 2015-01-12 -> 2015-01-12 iv. 2015-02-01 -> Blank Tile
-
Regular Multi-day date snapping (e.g. consistent 8-day, monthly, yearly cadence)
a. 2015-01-01/2016-01-01/P1M
i. 2015-01-01 -> 2015-01-01 ii. 2015-01-20 -> 2015-01-01 iii. 2015-12-31 -> 2015-12-01 iv. 2016-01-01 -> 2016-01-01 v. 2016-01-20 -> 2016-01-01 vi. 2016-02-01 -> Blank Tile vii. 2014-12-31 -> Blank Tile
b. 2015-01-01/2016-01-01/P3M
i. 2015-01-01 -> 2015-01-01 ii. 2015-01-20 -> 2015-01-01 iii. 2015-12-31 -> 2015-10-01 iv. 2016-01-01 -> 2016-01-01 v. 2016-01-20 -> 2016-01-01 vi. 2016-04-01 -> Blank Tile vii. 2014-12-31 -> Blank Tile
c. 1990-01-01/2016-01-01/P1Y
i. 1990-01-01 -> 2000-01-01 ii. 1990-05-20 -> 2000-01-01 iii. 2000-01-01 -> 2000-01-01 iv. 2000-05-20 -> 2000-01-01 v. 2005-12-31 -> 2005-01-01 vi. 2008-10-01 -> 2008-01-01 vii. 2016-11-20 -> 2016-01-01 viii. 2017-01-01 -> Blank Tile ix. 1989-12-31 -> Blank Tile
d. 2010-01-01/2012-03-11/P8D
i. 2010-01-01 -> 2010-01-01 ii. 2010-01-04 -> 2010-01-01 iii. 2010-01-10 -> 2010-01-09 iv. 2012-03-11 -> 2012-03-11 v. 2012-03-14 -> 2012-03-11 vi. 2012-03-19 -> Blank Tile vii. 2009-12-31 -> Blank Tile
-
Irregular Multi-day date snapping (e.g. irregular periods intermixed with consistent periods)
a. 2000-01-01/2000-06-01/P1M,2000-07-03/2000-07-03/P1M,2000-08-01/2000-12-01/P1M
i. 2000-01-01 -> 2000-01-01 ii. 2000-01-20 -> 2000-01-01 iii. 2000-06-10 -> 2000-06-01 iv. 2000-07-01 -> Blank Tile v. 2000-07-02 -> Blank Tile vi. 2000-07-03 -> 2000-07-03 vii. 2000-07-20 -> 2000-07-03 viii. 2000-08-01 -> 2000-08-01 ix. 2000-08-10 -> 2000-08-01 x. 2000-12-31 -> 2000-12-01 xi. 1999-12-31 -> Blank Tile xii. 2001-01-01 -> Blank Tile
b. 2001-01-01/2001-12-27/P8D, 2002-01-01/2002-12-27/P8D
i. 2001-01-01 -> 2001-01-01 ii. 2001-01-05 -> 2001-01-1 iii. 2001-05-14 -> 2001-05-09 iv. 2002-01-01 -> 2002-01-01 v. 2000-12-31 -> Blank Tile vi. 2003-01-01 -> 2002-12-27 vii. 2003-01-04 -> Blank Tile
##List of mod_oems tests:
- Request current (no time) JPEG via WMS
- Request current (no time) PNG via WMS
- Request current (time=default) JPEG tile via WMS
- Request current (time=default) PNG tile via WMS
- Request tile with date from "year" layer via WMS
- Request tile with date from "non-year" layer via WMS
- Request tile with date and time (sub-daily) from "year" layer via WMS
- Request WMS GetCapabilities 1.1.1
- Request WMS GetCapabilities 1.3.0
- Request WFS GetCapabilities 2.0.0
- Request erroneous layer via WMS
- Request tile with date and time (sub-daily) and another layer with YYYY-MM-DD time via WMS
- Request tile with multi-day period and snap to available date via WMS
- Request multiple layers with multi-day period and snap to available date via WMS
- Request multiple layers with multi-day period and snap to date that is out of range via WMS
- Request multiple layers with multi-day period and snap to date that is out of range for one of the layers via WMS
- Request multiple layers with bad date format via WMS
- Request layer with date and reproject from EPSG:4326 to EPSG:3857 via WMS
- Request multiple layers and reproject from EPSG:4326 to EPSG:3857 via WMS
- Request tile with time (sub-daily) and snap to available date time via WMS
- Request image from vector source file with time via WMS
- Request GeoJSON from vector source file via WFS
- Request CSV from vector source file via WFS
- Request GeoJSON from vector source file with time via WFS
- Request CSV from vector source file with time via WFS
##List of mrfgen tests:
- Global geographic PNG-MRF
- Global input image
- Geographic projection
- Paletted PNG input image
- Paletted MRF-PNG output image
- Tiled polar north JPEG-MRF
- Tiled input images
- Stereographic Polar North projection
- JPEG input images
- MRF-JPEG output image
- Global web mercator JPEG-MRF
- Global input image in geographic projection
- Reprojection to web mercator
- Geographic PNG-MRF using granule input files
- Granule input images with global coverage
- Input images cross antimeridian
- Native geographic projection
- Generate initial empty MRF with nocopy option
- Insert into existing MRF
- Create MRF with single granule
- Create MRF composite image with multiple granules
- Blend input images
- Use z-levels
- Add image to new z-level
- Add image to existing z-level
- Add image to multiple z-levels
- Web Mercator PNG-MRF using granule input files
- Granule input images with partial coverage
- Reprojection to web mercator
- No blending of input images
- Automatic creation of empty MRF
- Tiled geographic JPEG-MRF using tiled input files with z-level and time
- Tiled input images
- RGBA TIFF input images
- Use single z-level
- Use time (hh:mm:ss)
- Use zdb lookup
##List of vectorgen tests:
- MVT MRF generation
- Shapefile generation
##List of legend tests:
Tests legends in horizontal and vertical formats as PNGs and SVGs using various GIBS colormaps. The list of colormaps are configured in this file.