-
-
Notifications
You must be signed in to change notification settings - Fork 418
Test Suite
The MapServer test suite is called msautotest and exists inside the /MapServer repository at https://github.com/MapServer/MapServer/tree/master/msautotest
NOTE: The official msautotest instructions now live at https://www.mapserver.org/development/tests/autotest.html
Test suites are versioned, under branch names that match the MapServer branch they correspond to. I.e, the testsuite for the 6.2 MapServer version is located in the branch-6-2 msautotest branch
Obsolete as of MapServer 7.0, kept as a reference if branch-6-x need updating
The msautotest repository is included as a git submodule in the main MapServer repository. A submodule references a specific commit in the msautotest history, and must therefore be updated whenever changes are applied to the msautotest suite itself. The procedure to accomplish this e.g. in the branch-6-2 branch is:
cd mapserver-srcdir
git checkout branch-6-2
git submodule update
cd msautotest
git checkout branch-6-2
git pull origin branch-6-2 #update the msautotest to the latest version for the current branch
cd ..
git add msautotest
git commit -m "updated msautotest to latest 6.2 revision"
git push origin branch-6-2As the output of the tests largely depend on the compiled-in MapServer options and more subtly to the actual platform version, cpu type, compiler version or compiler flags, we require expected results to have been generated by a MapServer binary configured strictly like this:
-
For "textual" tests (capabilities, queries, gml, etc...):
-
GIS dependencies coming from the ubuntu-gis ppa. The full list of dependencies to install can be seen by following the
before_installsteps of https://github.com/mapserver/mapserver/blob/branch-6-2/.travis.yml -
for 6.2: mapserver ./configure'd with --with-gd --with-postgis --with-wmsclient --with-proj --with-wfsclient --with-kml --with-cairo --with-wcs --with-sos --with-geos --with-gdal --with-ogr --with-wfs
-
for >=6.4: cmake .. -DWITH_GD=1 -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 -DWITH_PYTHON=1 -DWITH_FRIBIDI=0 -DWITH_FCGI=0 -DWITH_EXEMPI=1 -DCMAKE_BUILD_TYPE=Release
-
For image tests (getmap, shp2img, etc..):
-
platform: Ubuntu Server 12.04, 64 bits (AMD64)
-
GIS dependencies coming from the ubuntu-gis ppa. The full list of dependencies to install can be seen by following the
before_installsteps of https://github.com/mapserver/mapserver/blob/branch-6-2/.travis.yml -
for 6.2: mapserver ./configure'd with --with-gd --with-postgis --with-wmsclient --with-proj --with-wfsclient --with-kml --with-cairo --with-wcs --with-sos --with-geos --with-gdal --with-ogr --with-wfs
-
for >=6.4: cmake .. -DWITH_GD=1 -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 -DWITH_PYTHON=1 -DWITH_FRIBIDI=0 -DWITH_FCGI=0 -DWITH_EXEMPI=1 -DCMAKE_BUILD_TYPE=Release
TODO Provide a platform where devs can update or add tests that conform to the reference platform.
Some tests require a postgis database. At the root level of the msautotest repository is a bash script that will create and populate an "msautotest" database. Beware that this script will drop any previously present "msautotest" database.
Specific test suites can be run manually by cd'ing into a subdirectory and running ./run-test.py. We currently maintain the following test suites:
- gdal : for gdal specific raster manipulation operations
- wxs : for ogc test cases
- query : for mapserver mode=map query tests
- renderers : for testing rendering output of the different output drivers
- misc : other unclassifiable tests
- mspython: Python MapScript tests (master, since June 30, 2013)
There is also a php test suite that requires the presence of phpunit, the installation of which can also be found in our .travis.yml before_install steps
We rely on travis-ci to run our test suite, the results of which can be seen at https://travis-ci.com/github/MapServer/MapServer/builds . The test suite is automatically run each time new code gets committed to the master or branch-7-4 branches. As of Dec. 13 2019, all tests pass successfully. It is the responsibility of the developer committing code to ensure that his changes has not broken any tests. The test suite is also run when pull requests are opened on our issue tracker, giving instant feedback on whether the proposed changes have unwanted side-effects.
The test suite runs from the same branch name in msautotest as the one being tested in mapserver, i.e. a commit on mapserver's branch-7-0 will be tested against msautotest's branch-7-0. You may override this behavior and have the test suite run on any third party repo/branch by adding a line of the form
msautotest=repo@sha
in your commit message, e.g:
msautotest=git://github.com/mapserver/msautotest.git@master
msautotest=git://github.com/tbonfort/msautotest.git@mybranch
msautotest=git://github.com/myuser/msautotest.git@3ed45ea23
For Windows builds, an AppVeyor account has been setup for branch-7-0 and master. The results are available at : https://ci.appveyor.com/project/MapServer/mapserver . Currently, only build is done (for Visual Studio 13 / VC 12, 32&64 bit), no tests are run. AppVeyor builds are triggered on pull requests and commit pushes.