WMS - Web Map Service - Test Cases

1. Test the WMS GetCapabilities request.

MAP-50,
MAP-51
1a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

1b. Using the header X-API-KEY with the value from step 1a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetCapabilities

1c. After sending a message, the response should look like:

<?xml version='1.0' encoding="UTF-8" standalone="no" ?
<WMS_Capabilities version="1.3.0"  xmlns="http://www.opengis.net/wms"   xmlns:sld="http://www.opengis.net/sld"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"   xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd  http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd  http://mapserver.gis.umn.edu/mapserver https://maptimus-dev.certusview.com/api/v2/mapserver?project=tests&amp;map=osm-tests-wms&amp;service=WMS&amp;version=1.3.0&amp;request=GetSchemaExtension"
    <!-- MapServer version 7.6.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --
    <Service
        <NameWMS</Name  

...  

                </Style
            </Layer
        </Layer
    </Capability
</WMS_Capabilities        

2. Test that we return a 400 error when sending an invalid GetCapabilities request.

MAP-52
2a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

2b. Using the header X-API-KEY with the value from step 3a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=i-dont-exist

2c. After sending a message, the JSON response should look like:

{
  "response": "failure",
  "message": "Parameter error: request 'i-dont-exist' is not a valid request."
}

3. Test the WMS GetMap request.

MAP-53,
MAP-55,
MAP-56,
MAP-57
3a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

3b. Using the header X-API-KEY with the value from step 4a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetMap&layers=test_roads&styles=&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&format=image/png&transparent=true

3c. After sending a message, the response image should look like:

wms_sampleMap.png


4. Test that we can get a WMS GetMap JPEG response.

MAP-54
4a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

4b. Using the header X-API-KEY with the value from step 5a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-jpeg&service=WMS&version=1.3.0&request=GetMap&layers=test_roads&styles=&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&format=image/jpeg&transparent=false

4c. After sending a message, the response image should look like:

wms_sampleMap.jpg


5. Test that we can get a WMS GetMap PDF response.

MAP-54
5a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

5b. Using the header X-API-KEY with the value from step 6a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-pdf&service=WMS&version=1.3.0&request=GetMap&layers=test_roads&styles=&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&format=application/x-pdf&transparent=false

5c. After sending a message, the response should look like:

wms_sampleMap.pdf


6. Test that we can get a WMS GetMap MVT response.

MAP-54
6a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

6b. Using the header X-API-KEY with the value from step 7a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-mvt&service=WMS&version=1.3.0&request=GetMap&layers=test_roads&styles=&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&format=application/x-protobuf&transparent=false

6c. After sending a message, the response should look like:

wms_sampleMap.mvt


7. Test that we can get a WMS GetMap KML response.

MAP-54
7a. Create a token using get_map_data as the resource, osm-tests-kml as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-kml"
}

Note: the map_name key is optional.

7b. Using the header X-API-KEY with the value from step 8a, send a message using the following URL:

https://maptimus.certusview.com//api/v2/mapserver?project=tests&map=osm-tests-kml&service=WMS&version=1.3.0&request=GetMap&layers=test_roads&styles=&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&format=application/vnd.google-earth.kmz

7c. After sending a message, the response should look like:

wms_sampleMap.kml


8. Test the WMS GetFeatureInfo request.

MAP-59,
MAP-60,
MAP-61
8a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

8b. Using the header X-API-KEY with the value from step 9a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&info_format=text/plain&i=64&j=64

8c. After sending a message, the response should look like:

GetFeatureInfo results:

Layer 'test_roads'
  Feature 21:
    id = '3654295'
    osm_id = '18901281'

...

    draw_layer = '0'
    sidewalk = 'none'
    surface = 'paved'
    access_type = 'yes'
    service = 'none'

9. Test that we can get a 400 error when sending a bad GetFeatureInfo request.

MAP-64
9a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

9b. Using the header X-API-KEY with the value from step 10a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=&info_format=text/html&i=128&j=128

9c. After sending a message, the JSON response should look like:

{
  "response": "failure", 
  "message": "msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and HEIGHT must be between 1 and 4096 pixels."
}

10. Test that we can get a WMS GetFeatureInfo response in GML.

MAP-60
10a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

10b. Using the header X-API-KEY with the value from step 11a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-gml&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&info_format=gml&i=128&j=128

10c. After sending a message, the GML response should look like:

<?xml version='1.0' encoding="UTF-8" ?
<wfs:FeatureCollection
   xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
   xmlns:gml="http://www.opengis.net/gml/3.2"
   xmlns:wfs="http://www.opengis.net/wfs/2.0"

...

      <access_typeyes</access_type
      <servicenone</service
    </test_roads_feature
  </test_roads_layer
</msGMLOutput

11. Test that we can get a WMS GetFeatureInfo response in HTML.

MAP-60
11a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

11b. Using the header X-API-KEY with the value from step 12a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&info_format=HTML&i=128&j=128

11c. After sending a message, the HTML response should look like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd"
<html
  <head
    <titleTest Template Sample</title
  </head

...

       </tr
      </table
    </form
  </body
</html

12. Test that we get a 400 response when not including the required i & j params.

MAP-61
12a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

12b. Using the header X-API-KEY with the value from step 13a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&info_format=HTML

12c. After sending a message, the JSON response should look like:

{
  "response": "failure",
  "message": "Parameter error: 'j' or 'y' is required."
}

13. Test a WMS request with no token authorization header.

MAP-13
13a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

13b. Using the header X-API-KEY with the value from step 13a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&request=GetCapabilities

13c. After sending a message, the JSON response should look like:

{
  "response": "failure",
  "message": "Parameter error: request 'i-dont-exist' is not a valid request."
}

14. Test a WMS request with an invalid authorization header.

MAP-13
14a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

14b. Using the header X-API-KEY with a value of not-a-valid-token, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&request=GetCapabilities

14c. After sending a message, the JSON response should look like:

{
  "response": "failure",
  "message": "No token header 'x-api-key' value found in request."
}

15. Test the WMS GetFeatureInfo request with the feature_count parameter.

MAP-62
15a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

15b. Using the header X-API-KEY with the value from step 27a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.3.0&request=GetFeatureInfo&layers=test_roads&query_layers=test_roads&crs=EPSG:4326&bbox=35.727097,-78.653373,35.736211,-78.642274&width=256&height=256&info_format=text/plain&i=64&j=64&feature_count=2

15c. After sending a message, the response should look like:

GetFeatureInfo results:

Layer 'test_roads'
  Feature 21: 
    id = '3654295'
    osm_id = '18901281'
    osm_timestamp = '2016/06/14 18:28:57+00'
    changeset = '40023430'
    highway_type = 'residential'
    street_name = 'Sherwee Drive'
    street_name_alternate = ''
    bicycle_flag = '0'
    foot_traffic_flag = '0'
    horse_traffic_flag = '0'
    golf_cart_flag = '0'
    wheel_chair_flag = '0'
    one_way_flag = '0'
    tunnel_flag = '0'
    covered_flag = '0'
    bridge_flag = '0'
    toll_flag = '0'
    travel_lanes = '0'
    speed_limit = '0'
    draw_layer = '0'
    sidewalk = 'none'
    surface = 'paved'
    access_type = 'yes'
    service = 'none'
  Feature 24: 
    id = '5201624'
    osm_id = '48978291'
    osm_timestamp = '2016/06/14 18:28:57+00'
    changeset = '40023430'
    highway_type = 'trunk'
    street_name = 'South Wilmington Street'
    street_name_alternate = ''
    bicycle_flag = '0'
    foot_traffic_flag = '0'
    horse_traffic_flag = '0'
    golf_cart_flag = '0'
    wheel_chair_flag = '0'
    one_way_flag = '1'
    tunnel_flag = '0'
    covered_flag = '0'
    bridge_flag = '0'
    toll_flag = '0'
    travel_lanes = '4'
    speed_limit = '45 mph'
    draw_layer = '0'
    sidewalk = 'none'
    surface = 'paved'
    access_type = 'yes'
    service = 'none'

16. Test that we get a GetStyles WMS response in XML.

MAP-154,
MAP-155
16a. Create a token using get_map_data as the resource, osm-tests-wms as the map_name, tests as the project_name and using your test AppKey:

{
  "appkey": "insert-your-appkey-here",
  "resource": "get_map_data",
  "project_name": "tests",
  "map_name": "osm-tests-wms"
}

Note: the map_name key is optional.

16b. Using the header X-API-KEY with the value from step 16a, send a message using the following URL:

https://maptimus.certusview.com/api/v2/mapserver?project=tests&map=osm-tests-wms&service=WMS&version=1.1.0&request=GetStyles&layers=test_roads

16c. After sending a message, the response should look like this:

<StyledLayerDescriptor version="1.1.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:se="http://www.opengis.net/se" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <NamedLayer>
        <se:Name>test_roads</se:Name>
        <UserStyle>
            <se:FeatureTypeStyle>

...

                </se:Rule>
            </se:FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>