index.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. .. _cite_test_guide:
  2. Cite Test Guide
  3. ===============
  4. A step by step guide to the GeoServer Compliance Interoperability Test Engine (CITE).
  5. .. contents::
  6. ~~~~~~~~~~~~~
  7. Check out OGC CITE suite tests
  8. ------------------------------
  9. .. note:: The CITE suite tests are available at `Open Geospatial Consortium`_.
  10. .. _Open Geospatial Consortium: https://github.com/opengeospatial
  11. Requirements:
  12. - `GeoServer instance <https://github.com/geoserver/geoserver>`_.
  13. - `Teamengine Web Application <https://github.com/geosolutions-it/teamengine-docker>`_, with a set of CITE suite tests.
  14. - ``make``
  15. CITE automation tests with docker
  16. ---------------------------------
  17. How to run the CITE Test suites with
  18. `docker <https://www.docker.com>`_.
  19. Requirements:
  20. - Running the tests requires a Linux system with `docker <https://www.docker.com>`_, `docker-compose <https://docs.docker.com/compose/install>`_, and Git installed on it.
  21. .. note::
  22. The CITE tools are available in the build/cite folder of the `GeoServer Git repository <https://github.com/geoserver/geoserver/tree/master/build/cite>`_:
  23. Set-up the environment
  24. ^^^^^^^^^^^^^^^^^^^^^^
  25. #. Clone the repository.
  26. .. code:: shell
  27. git clone https://github.com/geoserver/geoserver.git
  28. #. Go to the cite directory.
  29. .. code:: shell
  30. cd geoserver/build/cite
  31. #. Inside you will find a structure, like below, with a list of directories which contains the name of the suites to run.
  32. .. code:: shell
  33. cite
  34. |-- forms
  35. |-- geoserver
  36. |-- run-test.sh
  37. |-- wcs10
  38. |-- wcs11
  39. |-- wfs10
  40. |-- wms11
  41. |-- wms13
  42. |-- wfs11
  43. |-- interactive
  44. |-- logs
  45. |-- docker-compose.yml
  46. |-- postgres
  47. |-- README.md
  48. `-- Makefile
  49. Running the suite tests
  50. ^^^^^^^^^^^^^^^^^^^^^^^
  51. There are 2 ways to run the suites. One is running with ``make`` that will
  52. automate all the commands, and the second one is running the test through WebUI:
  53. 1. Running it through ``Makefile``:
  54. - run ``make`` in the console, it will give you the list of commands
  55. to run.
  56. .. code:: shell
  57. make
  58. - the output will look like this:
  59. .. code:: makefile
  60. clean: $(suite) This will clean the Environment of previous runs.
  61. build: $(suite) This will build the GeoServer Docker Image for the Environment.
  62. test: $(suite) This will run the Suite test with teamengine.
  63. webUI: $(suite) This will run the Suite test with teamengine.
  64. - Choose which test to run, this is an example:
  65. .. warning::
  66. The first Docker build may take a long time.
  67. .. code:: SHELL
  68. suite=wcs10
  69. .. note::
  70. Valid values for the suite parameter are:
  71. * wcs10
  72. * wcs11
  73. * wfs10
  74. * wfs11
  75. * wms11
  76. * wms13
  77. - Choose which GeoServer war file to test by setting the ``war_url`` environment variable inside the ``Makefile``, ex:
  78. .. code:: C
  79. war_url = "https://build.geoserver.org/geoserver/main/geoserver-main-latest-war.zip"
  80. 2. If you don't want to do it inside the ``Makefile`` you have the option of adding the variable in the command when you build the docker images.
  81. - To clean the local environment.
  82. .. code:: shell
  83. make clean
  84. - To build the GeoServer Docker image locally.
  85. .. code:: shell
  86. make build suite=<suite-name>
  87. - Alternative, with the ``war_url`` variable include:
  88. .. code::
  89. make build suite=<suite-name> war_url=<url-or-the-GeoServer-war-file-desired>
  90. - To run the suite test.
  91. .. code:: shell
  92. make test suite=<suite-name>
  93. - To run the full automate workflow.
  94. .. code:: shell
  95. make clean build test suite=<suite-name>
  96. Run CITE Test Suites on a local PC
  97. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  98. .. note::
  99. I assume that you have a standalone GeoServer running.
  100. .. important::
  101. Details to consider when you are running the tests:
  102. - The default username/password for the teamengine webUI are **teamengine/teamengine**.
  103. - the default URL for the teamengine webUI is http://localhost:8888/teamengine/
  104. - The output of the old suite tests might not appear in the Result page. So you should click on the link below **detailed old test report**, to get the full report. Ex.
  105. .. image:: ./image/old-report.png
  106. .. image:: ./image/full-report.png
  107. - Since you are running teamengine inside a container, the localhost in the URL of GeoServer for the tests can't be used, for that, get the IP address of the host where the GeoServer is running. You will use it later.
  108. - after you log in to teamengine webUI you have to create a session.
  109. .. image:: ./image/seccion.png
  110. - to run the tests you have to choose which one you want, and then click on **Start a new test session**. This is an example:
  111. .. image:: ./image/tewfs-1_0a.png
  112. Requirements:
  113. - GeoServer running.
  114. - PostgreSQL with PostGIS extension installed. (only for the WFS Tests Suites)
  115. - Teamengine Running in docker container.
  116. #. Clone the repository:
  117. .. code:: shell
  118. git clone https://github.com/geoserver/geoserver.git
  119. #. Change directory to the ``cite``
  120. .. code:: shell
  121. cd geoserver/build/cite
  122. #. Check the commands available:
  123. - Run ``make`` to check:
  124. .. code:: shell
  125. make
  126. - you should get an output as following:
  127. .. code:: makefile
  128. clean: $(suite) This will clean the Environment of previous runs.
  129. build: $(suite) This will build the GeoServer Docker Image for the Environment.
  130. test: $(suite) This will run the Suite test with teamengine.
  131. webUI: $(suite) This will run the Suite test with teamengine.
  132. Run WFS 1.0 tests
  133. ^^^^^^^^^^^^^^^^^
  134. .. important::
  135. Running WFS 1.0 tests require PostgreSQL with PostGIS extension installed in the system.
  136. Requirements:
  137. - `GeoServer running`
  138. - teamengine
  139. - PostgreSQL
  140. - PostGIS
  141. #. Prepare the environment:
  142. - login to PostgreSQL and create a user named "cite".
  143. .. code:: sql
  144. createuser cite;
  145. - Create a database named "cite", owned by the "cite" user:
  146. .. code:: sql
  147. createdb cite own by cite;
  148. - enter the database and enable the postgis extension:
  149. .. code:: sql
  150. create extension postgis;
  151. - Change directory to the citewfs-1.0 data directory and execute the script cite_data_postgis2.sql:
  152. .. code-block:: shell
  153. cd <path of GeoServer repository>
  154. psql -U cite cite < build/cite/wfs10/citewfs-1.0/cite_data_postgis2.sql
  155. - Start GeoServer with the citewfs-1.0 data directory. Example:
  156. .. important::
  157. If the PostgreSQL server is not on the same host as the GeoServer, you have to change the `<entry key="host">localhost</entry>` in the `datastore.xml` file, located inside each workspace directory. ex.
  158. .. note::
  159. <path of GeoServer repository>/build/cite/wfs10/citewfs-1.0/workspaces/cgf/cgf/datastore.xml
  160. .. code-block:: shell
  161. cd <root of GeoServer install>
  162. export GEOSERVER_DATA_DIR=<path of GeoServer repository>/build/cite/wfs10/citewfs-1.0
  163. ./bin/startup.sh
  164. #. Start the test:
  165. .. code:: shell
  166. make webUI
  167. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  168. - click on the **Sign in** button and enter the user and password.
  169. - after creating the session, and choosing the test, enter the following parameters:
  170. #. ``Capabilities URL`` http://<ip-of-the-GeoServer>:8080/geoserver/wfs?request=getcapabilities&service=wfs&version=1.0.0
  171. #. ``Enable tests with multiple namespaces`` tests included
  172. .. image:: ./image/tewfs-1_0.png
  173. Run WFS 1.1 tests
  174. ^^^^^^^^^^^^^^^^^
  175. .. important::
  176. Running WFS 1.1 tests requires PostgreSQL with PostGIS extension installed in the system.
  177. Requirements:
  178. - GeoServer
  179. - teamengine
  180. - PostgreSQL
  181. - PostGIS
  182. #. Prepare the environment:
  183. - login to PostgreSQL and create a user named "cite".
  184. .. code:: sql
  185. createuser cite;
  186. - Create a database named "cite", owned by the "cite" user:
  187. .. code:: sql
  188. createdb cite own by cite;
  189. - enter to the database and enable the postgis extension:
  190. .. code:: sql
  191. create extension postgis;
  192. - Change directory to the citewfs-1.1 data directory and execute the script dataset-sf0-postgis2.sql:
  193. .. code-block:: shell
  194. cd <path of GeoServer repository>
  195. psql -U cite cite < build/cite/wfs11/citewfs-1.1/dataset-sf0-postgis2.sql
  196. - Start GeoServer with the citewfs-1.1 data directory. Example:
  197. .. important::
  198. If the PostgreSQL server is not on the same host as the GeoServer, you have to change the `<entry key="host">localhost</entry>` in the `datastore.xml` file, located inside each workspace directory. ex.
  199. .. note::
  200. <path of GeoServer repository>/build/cite/wfs11/citewfs-1.1/workspaces/cgf/cgf/datastore.xml
  201. .. code-block:: shell
  202. cd <path of GeoServer install>
  203. export GEOSERVER_DATA_DIR=<path of GeoServer repository>/build/cite/wfs11/citewfs-1.1
  204. ./bin/startup.sh
  205. #. Start the test:
  206. .. code:: shell
  207. make webUI
  208. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  209. - click on the **Sign in** button and enter the user and password.
  210. - after creating the session, and choosing the test, enter the following parameters:
  211. #. ``Capabilities URL`` http://<ip-of-the-GeoServer>:8080/geoserver/wfs?service=wfs&request=getcapabilities&version=1.1.0
  212. #. ``Supported Conformance Classes``:
  213. * Ensure ``WFS-Transaction`` is *checked*
  214. * Ensure ``WFS-Locking`` is *checked*
  215. * Ensure ``WFS-Xlink`` is *unchecked*
  216. .. image:: ./image/tewfs-1_1a.png
  217. #. ``GML Simple Features``: ``SF-0``
  218. .. image:: ./image/tewfs-1_1b.png
  219. Run WMS 1.1 tests
  220. ^^^^^^^^^^^^^^^^^
  221. #. Prepare the environment:
  222. - Start GeoServer with the citewms-1.1 data directory. Example:
  223. .. code-block:: shell
  224. cd <root of GeoServer install>
  225. export GEOSERVER_DATA_DIR=<path of GeoServer repository>/build/cite/wms11/citewms-1.1
  226. ./bin/startup.sh
  227. #. Start the test:
  228. .. code:: shell
  229. make webUI
  230. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  231. - click on the **Sign in** button and enter the user and password.
  232. - after creating the session, and choosing the test, enter the following parameters:
  233. #. ``Capabilities URL``
  234. http://<ip-of-the-GeoServer>:8080/geoserver/wms?service=wms&request=getcapabilities&version=1.1.1
  235. #. ``UpdateSequence Values``:
  236. * Ensure ``Automatic`` is selected
  237. * "2" for ``value that is lexically higher``
  238. * "0" for ``value that is lexically lower``
  239. #. ``Certification Profile`` : ``QUERYABLE``
  240. #. ``Optional Tests``:
  241. * Ensure ``Recommendation Support`` is *checked*
  242. * Ensure ``GML FeatureInfo`` is *checked*
  243. * Ensure ``Fees and Access Constraints`` is *checked*
  244. * For ``BoundingBox Constraints`` ensure ``Either`` is selected
  245. #. Click ``OK``
  246. .. image:: ./image/tewms-1_1a.png
  247. .. image:: ./image/tewms-1_1b.png
  248. Run WCS 1.0 tests
  249. ^^^^^^^^^^^^^^^^^
  250. #. Prepare the environment:
  251. - Start GeoServer with the citewcs-1.0 data directory. Example:
  252. .. code-block:: shell
  253. cd <root of GeoServer install>
  254. export GEOSERVER_DATA_DIR=<path of GeoServer repository>/build/cite/wcs10/citewcs-1.0
  255. ./bin/startup.sh
  256. #. Start the test:
  257. .. code:: shell
  258. make webUI
  259. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  260. - click on the **Sign in** button and enter the user and password.
  261. - after creating the session, and choosing the test, enter the following parameters:
  262. #. ``Capabilities URL``:
  263. http://<ip-of-the-GeoServer>:8080/geoserver/wcs?service=wcs&request=getcapabilities&version=1.0.0
  264. #. ``MIME Header Setup``: "image/tiff"
  265. #. ``Update Sequence Values``:
  266. * "2" for ``value that is lexically higher``
  267. * "0" for ``value that is lexically lower``
  268. #. ``Grid Resolutions``:
  269. * "0.1" for ``RESX``
  270. * "0.1" for ``RESY``
  271. #. ``Options``:
  272. * Ensure ``Verify that the server supports XML encoding`` is *checked*
  273. * Ensure ``Verify that the server supports range set axis`` is *checked*
  274. #. ``Schemas``:
  275. * Ensure that ``The server implements the original schemas from the WCS 1.0.0 specification (OGC 03-065`` is selected
  276. #. Click ``OK``
  277. .. image:: ./image/tewcs-1_0a.png
  278. .. image:: ./image/tewcs-1_0b.png
  279. .. image:: ./image/tewcs-1_0c.png
  280. Run WCS 1.1 tests
  281. ^^^^^^^^^^^^^^^^^
  282. #. Prepare the environment:
  283. - Start GeoServer with the citewcs-1.1 data directory. Example:
  284. .. code-block:: shell
  285. cd <root of GeoServer install>
  286. export GEOSERVER_DATA_DIR=<root of GeoServer sources>/build/cite/wcs11/citewcs-1.1
  287. ./bin/startup.sh
  288. #. Start the test:
  289. .. code:: shell
  290. make webUI
  291. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  292. - click on the **Sign in** button and enter the user and password.
  293. - after creating the session, and choosing the test, enter the following parameters:
  294. #. ``Capabilities URL``:
  295. http://<ip-of-the-GeoServer>:8080/geoserver/wcs
  296. Click ``Next``
  297. .. image:: ./image/tewcs-1_1a.png
  298. Run WMS 1.3 tests
  299. ^^^^^^^^^^^^^^^^^
  300. #. Prepare the environment:
  301. - Start GeoServer with the citewcs-1.3 data directory. Example:
  302. .. code-block:: shell
  303. cd <root of GeoServer install>
  304. export GEOSERVER_DATA_DIR=<root of GeoServer sources>/build/cite/wms13/citewms-1.3
  305. ./bin/startup.sh
  306. #. Start the test:
  307. .. code:: shell
  308. make webUI
  309. #. Go to the browser and open the teamengine `webUI <http://localhost:8888/teamengine>`_.
  310. - click on the **Sign in** button and enter the user and password.
  311. - after creating the session, and choosing the test, enter the following parameters:
  312. #. ``Capabilities URL``:
  313. http://<ip-of-the-GeoServer>:8080/geoserver/wms?service=wms&request=getcapabilities&version=1.3.0
  314. #. ``UpdateSequence Values``:
  315. * ``Automatic`` *checked*
  316. #. ``Options``:
  317. * Ensure ``BASIC`` is *checked*
  318. * Ensure ``QUERYABLE`` is *checked*
  319. Click ``OK``
  320. .. image:: ./image/tewms-1_3.png
  321. .. _commandline:
  322. .. _teamengine: