7. Teste de conformidade OGC
O Open Geospatial Consortium (OGC) fornece testes que podem ser executados sem custos para ter certeza de que um servidor está de acordo com uma certa especificação. Este capítulo tem um breve tutorial para fazer o setup dos testes WMS em um sistema Ubuntu. A documentação detalhada pode ser encontrada no OGC website.
7.1. pyogctest
pyogctest is a Python tool dedicated to run OGC tests easily. The installation may be done in a virtual environment:
git clone https://github.com/pblottiere/pyogctest
virtualenv venv
source venv/bin/activate
pip install -e pyogctest/
7.2. WMS 1.3.0 test suite
To run the WMS 1.3.0 test suite with success, a test dataset is needed. It can be downloaded using pyogctest:
./pyogctest.py -s wms130 --download
After the download, a teamengine_wms_130.qgs
project is available in the
new data
directory. This project has to be registered as the default
project for QGIS Server thanks to the QGIS_SERVER_PROJECT_FILE environment
variable. This way, we don’t need to explicitly set the MAP
vendor-parameter of QGIS Server.
A specific configuration is also necessary to comply with metadata tests.
Indeed, some metadata are available in the data/metadata
directory and have
to be available for the OGC testing framework thanks to an URL. The easiest
option is to configure your web server to have an access through something like
http://XXX.XXX.XXX.XXX/metadata/Autos.xml
. These metadata URLs are defined
in the project and inserted in the WMS GetCapabilities
document. So the
project needs to be updated according to your testing environment to let QGIS
Server generate a valid XML document:
./pyogctest.py -s wms130 -m http://XXX.XXX.XXX.XXX/metadata
Now that everything is properly configured, we can run the WMS 1.3.0 test suite:
./pyogctest.py -s wms130 -u http://XXX.XXX.XXX.XXX/qgisserver