Permalink
Browse files

Add autotests for WMS client 1.1.1 and 1.3.0

 - Tested are GetMap and GetFeatureInfo (HTML)

 - Uses the MapServer demo WMS

 - Tests automatic and forced axis flipping

Refs #3039
  • Loading branch information...
ejn committed Feb 13, 2018
1 parent 229a92a commit 6e82b42fd628b622b87552779fd70d6a73066411
@@ -0,0 +1,27 @@
Content-Type: text/html
<h4>
<b>Layer: Cities</b>
</h4>
<table cellpadding=5 cellspacing=2 border=0>
<tr bgcolor=#CCCCCC>
<td>CITY NAME</td>
<td>POPULATION</td>
</tr>
<tr>
<td>Buenos Aires</td>
<td>12116379</td>
</tr> <tr>
<td>Montevideo</td>
<td>1347584</td>
</tr> <tr>
<td>La Plata</td>
<td>838620</td>
</tr> <tr>
<td>Mar del Plata</td>
<td>683721</td>
</tr> <tr>
<td>Neuquen</td>
<td>370271</td>
</tr> </table>
<p>&nbsp;</p>
Binary file not shown.
@@ -0,0 +1,2 @@
Content-Type: text/html
Binary file not shown.
@@ -0,0 +1,27 @@
Content-Type: text/html
<h4>
<b>Layer: Cities</b>
</h4>
<table cellpadding=5 cellspacing=2 border=0>
<tr bgcolor=#CCCCCC>
<td>CITY NAME</td>
<td>POPULATION</td>
</tr>
<tr>
<td>Buenos Aires</td>
<td>12116379</td>
</tr> <tr>
<td>Montevideo</td>
<td>1347584</td>
</tr> <tr>
<td>La Plata</td>
<td>838620</td>
</tr> <tr>
<td>Mar del Plata</td>
<td>683721</td>
</tr> <tr>
<td>Neuquen</td>
<td>370271</td>
</tr> </table>
<p>&nbsp;</p>
Binary file not shown.
@@ -0,0 +1,2 @@
Content-Type: text/html
Binary file not shown.
@@ -0,0 +1,58 @@
#
# Test WMS 1.1.1 Client
#
# REQUIRES: OUTPUT=PNG SUPPORTS=WMS_CLIENT
#
#
# GetMap
# RUN_PARMS: wms_client_111.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90" > [RESULT_DEMIME]
#
# GetFeatureInfo
# RUN_PARMS: wms_client_111.html [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90&QUERY_LAYERS=client&I=100&J=150&INFO_FORMAT=text/html&FEATURE_COUNT=5" > [RESULT]
MAP
NAME WMS_CLIENT_TEST_111
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
PROJECTION
"init=epsg:4326"
END
IMAGECOLOR 255 255 255
SYMBOLSET etc/symbols.sym
FONTSET etc/fonts.txt
RESOLUTION 96
IMAGETYPE png24
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"ows_updatesequence" "123"
"wms_title" "Test WMS 1.1.1 client"
"wms_srs" "EPSG:4326"
"ows_enable_request" "*"
"wms_getmap_formatlist" "image/png,image/png; mode=24bit"
"ows_onlineresource" "http://localhost/wmsclient?"
END
END
LAYER
NAME client
TYPE RASTER
STATUS ON
CONNECTION "http://demo.mapserver.org/cgi-bin/wms?"
CONNECTIONTYPE WMS
TEMPLATE "dummy"
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "cities"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
"wms_enable_request" "*"
END
END
END
@@ -0,0 +1,59 @@
#
# Test WMS 1.1.1 Client
#
# REQUIRES: OUTPUT=PNG SUPPORTS=WMS_CLIENT
#
#
# GetMap
# RUN_PARMS: wms_client_111_axis_fail.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90" > [RESULT_DEMIME]
#
# GetFeatureInfo
# RUN_PARMS: wms_client_111_axis_fail.html [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90&QUERY_LAYERS=client&I=100&J=150&INFO_FORMAT=text/html&FEATURE_COUNT=5" > [RESULT]
MAP
NAME WMS_CLIENT_TEST_111
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
PROJECTION
"init=epsg:4326"
END
IMAGECOLOR 255 255 255
SYMBOLSET etc/symbols.sym
FONTSET etc/fonts.txt
RESOLUTION 96
IMAGETYPE png24
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"ows_updatesequence" "123"
"wms_title" "Test WMS 1.1.1 client"
"wms_srs" "EPSG:4326"
"ows_enable_request" "*"
"wms_getmap_formatlist" "image/png,image/png; mode=24bit"
"ows_onlineresource" "http://localhost/wmsclient?"
END
END
LAYER
NAME client
TYPE RASTER
STATUS ON
CONNECTION "http://demo.mapserver.org/cgi-bin/wms?"
CONNECTIONTYPE WMS
TEMPLATE "dummy"
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "cities"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
"wms_enable_request" "*"
"wms_strict_axis_order" "true"
END
END
END
@@ -0,0 +1,58 @@
#
# Test WMS 1.3.0 Client
#
# REQUIRES: OUTPUT=PNG SUPPORTS=WMS_CLIENT
#
#
# GetMap
# RUN_PARMS: wms_client_130.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90" > [RESULT_DEMIME]
#
# GetFeatureInfo
# RUN_PARMS: wms_client_130.html [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90&QUERY_LAYERS=client&I=100&J=150&INFO_FORMAT=text/html&FEATURE_COUNT=5" > [RESULT]
MAP
NAME WMS_CLIENT_TEST_130
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
PROJECTION
"init=epsg:4326"
END
IMAGECOLOR 255 255 255
SYMBOLSET etc/symbols.sym
FONTSET etc/fonts.txt
RESOLUTION 96
IMAGETYPE png24
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"ows_updatesequence" "123"
"wms_title" "Test WMS 1.3.0 client"
"wms_srs" "EPSG:4326"
"ows_enable_request" "*"
"wms_getmap_formatlist" "image/png,image/png; mode=24bit"
"ows_onlineresource" "http://localhost/wmsclient?"
END
END
LAYER
NAME client
TYPE RASTER
STATUS ON
CONNECTION "http://demo.mapserver.org/cgi-bin/wms?"
CONNECTIONTYPE WMS
TEMPLATE "dummy"
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "cities"
"wms_server_version" "1.3.0"
"wms_format" "image/png"
"wms_enable_request" "*"
END
END
END
@@ -0,0 +1,59 @@
#
# Test WMS 1.3.0 Client
#
# REQUIRES: OUTPUT=PNG SUPPORTS=WMS_CLIENT
#
#
# GetMap
# RUN_PARMS: wms_client_130_axis_fail.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90" > [RESULT_DEMIME]
#
# GetFeatureInfo
# RUN_PARMS: wms_client_130_axis_fail.html [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=client&STYLES=&WIDTH=300&HEIGHT=200&FORMAT=image/png&SRS=EPSG:4326&BBOX=-180,-90,180,90&QUERY_LAYERS=client&I=100&J=150&INFO_FORMAT=text/html&FEATURE_COUNT=5" > [RESULT]
MAP
NAME WMS_CLIENT_TEST_130
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
PROJECTION
"init=epsg:4326"
END
IMAGECOLOR 255 255 255
SYMBOLSET etc/symbols.sym
FONTSET etc/fonts.txt
RESOLUTION 96
IMAGETYPE png24
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"ows_updatesequence" "123"
"wms_title" "Test WMS 1.3.0 client"
"wms_srs" "EPSG:4326"
"ows_enable_request" "*"
"wms_getmap_formatlist" "image/png,image/png; mode=24bit"
"ows_onlineresource" "http://localhost/wmsclient?"
END
END
LAYER
NAME client
TYPE RASTER
STATUS ON
CONNECTION "http://demo.mapserver.org/cgi-bin/wms?"
CONNECTIONTYPE WMS
TEMPLATE "dummy"
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "cities"
"wms_server_version" "1.3.0"
"wms_format" "image/png"
"wms_enable_request" "*"
"wms_strict_axis_order" "0"
END
END
END

0 comments on commit 6e82b42

Please sign in to comment.