msautotest/wxs
Frank Warmerdam
warmerdam at POBOX.COM
Thu Sep 22 15:00:20 EDT 2005
On 9/22/05, Kralidis,Tom [Burlington] <Tom.Kralidis at ec.gc.ca> wrote:
>
> Frank,
>
> Count me in -- I can help with any of WMS/WFS/WCS and would be glad to
> help.
Tom,
Great! I was thinking of you when I sent out the plea.
If you check msautotest out of CVS, you will find the "web services"
tests in msautotest/wxs. There are currently five run off one map file.
The mapfile is prefixed by the REQUIRES: directive, and a RUN_PARMS
for each test:
#
# Test WCS.
#
# REQUIRES: INPUT=GDAL OUTPUT=PNG SUPPORTS=WCS
#
# Capabilities
# RUN_PARMS: wcs_cap.xml [MAPSERV]
QUERY_STRING='map=[MAPFILE]&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCapabilities'
> [RESULT]
#
# Coverage description
# RUN_PARMS: wcs_describe.xml [MAPSERV]
QUERY_STRING='map=[MAPFILE]&SERVICE=WCS&VERSION=1.0.0&REQUEST=DescribeCoverage&COVERAGE=grey'
> [RESULT]
#
# Generate 16bit GeoTIFF.
# RUN_PARMS: wcs_16.tif [MAPSERV]
QUERY_STRING='map=[MAPFILE]&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&WIDTH=120&HEIGHT=90&FORMAT=GEOTIFF_16&BBOX=0,0,400,300&COVERAGE=grey&CRS=EPSG:32611'
> [RESULT_DEMIME]
#
# Generate simple PNG.
# RUN_PARMS: wcs_simple.png [MAPSERV]
QUERY_STRING='map=[MAPFILE]&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&WIDTH=120&HEIGHT=90&FORMAT=GDPNG&BBOX=0,0,400,300&COVERAGE=grey&CRS=EPSG:32611'
> [RESULT_DEMIME]
#
# Use bilinear resampling.
# RUN_PARMS: wcs_bilinear.png [MAPSERV]
QUERY_STRING='map=[MAPFILE]&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&WIDTH=120&HEIGHT=90&FORMAT=GDPNG&BBOX=0,0,400,300&COVERAGE=grey&CRS=EPSG:32611&INTERPOLATION=BILINEAR'
> [RESULT_DEMIME]
#
... then the actual mapffile.
You can pretty much see clone the above but for each test you add you should:
o Change the first argument to RUN_PARMS which will be the result file from the
test.
o Update the QUERY_STRING parameters.
When you run the "run_tests.py" script each test in turn is run, and the
result is compared to the file in the expected directory. If the test
fails, the
failed result will be left in the result directory.
It should work fine for XML responses as well as image responses. Use
[RESULT_NOMIME] for image results so the content type will be stripped
off. Just use [RESULT] for XML responses as having the headers doesn't
hurt there.
Please keep the quantity of data and results of modest size, and put them
in the data directory. We likely ought to centralize some of the data for
the 4 different test directories but that isn't pressing.
Let me know if you have specific questions.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the mapserver-dev
mailing list