From ff44b91a6e8d86d2bcd82df06a5b3d5f2084389d Mon Sep 17 00:00:00 2001 From: Matthias Schaub Date: Mon, 27 May 2024 16:52:01 +0200 Subject: [PATCH] docs: move approval test section one down --- docs/development-setup.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/development-setup.md b/docs/development-setup.md index 43bc0e3a..945dfe87 100644 --- a/docs/development-setup.md +++ b/docs/development-setup.md @@ -103,27 +103,28 @@ To run all tests: pytest ``` +#### Integration Tests + +The integration test suite utilizes the [Testcontainers framework](https://testcontainers.com/) to run unique instances of Redis and Postgres for each test session. It also configures and starts Flask and Celery workers in the background. + +Many fixtures are written to a temporary directory on disk managed by Pytest. This makes it easy to inspect the results at various steps of the program (E.g. Marking detection pipeline). Unix users usually find this directory under `/tmp/pytest-of-{user}/pytest-current/{uuid}/`. The UUID of requests triggered by the tests (E.g. Create or digitize) is the directory name. + +The integration tests will make requests external services. Among others requests are made to HeiGIT Maps (WMS) to retrieve basemap images. Those requests can only be made from HeiGITs internal network. + Some test are using the [Approval Testing methodology](https://approvaltests.com/). Approval tests capture the output (snapshot) of a piece of code and compare it with a previously approved version of the output. -Once the output has been *approved* then as long as the output stays the same the -test will pass. A test fails if the *received* output is not identical -to the approved version. In this case, the difference of the received and the -approved output is reported to the tester. +Once the output has been *approved* then as long as the output stays the same +the test will pass. A test fails if the *received* output is not identical to +the approved version. In that case, the difference of the received and the +approved output is reported to the tester. The representation of the report can +take any form: A diff-tool comparing received and approved text or images side-by-side. In the case of the Sketch Map Tool the report takes the form of two images side-by-side, the uploaded sketch map with markings (input) and the resulting GeoJSON with the detected markings. -#### Integration Tests - -The integration test suite utilizes the Testcontainers framework to run unique instances of Redis and Postgres for each test session. It also configures and starts Flask and Celery workers in the background. - -Many fixtures are written to a temporary directory on disk managed by Pytest. This makes it easy to inspect the results at various steps of the program (E.g. Marking detection pipeline). Unix users usually find this directory under `/tmp/pytest-of-{user}/pytest-current/{uuid}/`. The UUID of requests triggered by the tests (E.g. Create or digitize) is the directory name. - -The integration tests will make requests external services. Among others requests are made to HeiGIT Maps (WMS) to retrieve basemap images. Those requests can only be made from HeiGITs internal network. - ### Update dependencies When dependencies changed the environment can be updated by running: