The WMS Tester is provided as part of the Weave release to assist with testing Web Map Services (WMS). However it is not part of Weave, it runs independently of Weave, so is a good tool for narrowing down problems with a WMS. As a Weave System Administrator, the WMS Tester can be used with other tools (Administrator Tool and Weave console commands) to help you identify and rectify problems with the operation of WMS within Weave.
What is the WMS Tester
The WMS Tester is a java program that will test the response from a WMS. It can be used on any WMS, either those from within your organisation or external to it. It can be used when you're having problems with a WMS that's used in Weave, as it will test the WMS itself, without any reference to the WMS in the Weave environment. Sometimes it's difficult to determine whether a problem is originating in Weave or in the data and services that Weave is using - with the WMS Tester you will at least be able to test the performance of the WMS.
Using the WMS Tester
The WMS Tester file (wmstest.jar
) is stored in your c:\<weave installation folder>
, e.g. c:\weave
. It requires java to run so if you don't have Java installed you can use the Java executable that is installed with Weave (e.g. c:\weave\jre\bin
).
In a Windows environment, open Windows Command Line, run the following to get a help listing:
c:\weave\jre\bin\java -jar c:\weave\wmstest.jar -h
usage: wmstest -f <filename> | -u <url> [-e <minx,miny,maxx,maxy> | -l
<x,y,scale>] [-c <crs>] [-x <scale>] [-s <width,height>] [-D
<DPI>] [-t <timeout>] [-n] [-o filename>] [-d] [-b <threads>] [-U
<username>] [-P <password>] [-q] [-h] [-V]
The parameters that can be used in the tester are given in the table below, either the - or -- syntax can be used:
Parameter | Description |
---|---|
-f, --file <filename> | Filename of a text file that has a list of base URL's for the WMS services. Each line in the file should contain a single WMS URL. |
-u, --url <url> | The base URL for the WMS service, this can be added more than once, but the -f command can also be used for multiple URL's. |
-e, --envelope minx,miny,maxx,maxy> | The envelope to use to draw the map, alternative to -l, and can not be set if -l is set. |
-l, --location <x,y,scale> | The center location to use to draw the map, alternative to -e, and can not be set if -e is set. |
-c, --crs <crs> | The CRS to use for the map requests, default is EPSG:4326. |
-x, --maxscale <scale> | The maximum scale to use to generate the map. |
-s, --size <width,height> | The width and height, in pixels, of the generated map image, default 400,400 |
-D, --dpi <DPI> | DPI to use when creating the map images, default 90.71. |
-t, --timeout <timeout> | The network timeout in seconds, default 120 |
-n, --nomap | Just retrieve the capabilities document, don't generate a map request. |
-o, --output <filename> | Output results to CSV file. |
-d, --dump | Dump the generated images to a file. |
-b, --background <threads> | Create all the connections in the background at the same time, rather than processing the URLs one by one. Including the <threads> value will specify how may tasks do at once, if not set all tasks will be performed at once. |
-U, --username <username> | Username to connect with, must be supplied if the password is set. |
-P, --password <password> | Password to connect with, must be supplied if username is set. |
-q, --quiet | Do not output results to the console |
-h, --help | Show this help and quit. |
-V, --version | Print the version and exit. |
If neither -l or -e is set the area to draw will be calculated based on the extent of the layer, but it will be adjusted if a maximum scale range has been applied to the layer or -x is set. |
Examples of the WMS Tester
The WMS Tester allows you to test various aspects of a WMS including specifying the extent, scale, size of images, etc. But it can be used in its simplest form in the following ways:
- Testing an internal WMS: Return the layers in the WMS and time taken to draw layer (in milliseconds) and the scale at which the layer is drawn
c:\weave\jre\bin\java -jar c:\weave\wmstest.jar -u <url>
- Testing an external WMS: Return the layers in the WMS and time taken to draw layer (in milliseconds) and the scale at which the layer is drawn
c:\weave\jre\bin\java -jar c:\weave\wmstest.jar -u http://services.ga.gov.au/gis/services/Aviation_Facilities/MapServer/WMSServer
- Testing an external WMS with background processing to simulate ????? (what situation???)
c:\weave\jre\bin\java -jar c:\weave\wmstest.jar -u http://services.ga.gov.au/gis/services/Aviation_Facilities/MapServer/WMSServer -b 100
- Getting map images from external WMS: Creates a file (
images.zip
) in the current folder containing map images generated based on parameters submitted
c:\weave\jre\bin\java -jar c:\weave\wmstest.jar -u http://services.ga.gov.au/gis/services/Aviation_Facilities/MapServer/WMSServer -d
For more details on using WMS in Weave refer to this page in the Weave System Administrator Guides.