Index: src/mapservice/codegen/code_generator
===================================================================
--- src/mapservice/codegen/code_generator	(revision a2b80527e9200b6feac74d75840bf6c8c3a26916)
+++ src/mapservice/codegen/code_generator	(revision f61d16dca169fde5664167625559dbb0a3208b22)
@@ -62,4 +62,9 @@
 echo 'pip install $@' >> "${TOX_INSTALL_COMMAND}"
 chmod 0755 "${TOX_INSTALL_COMMAND}"
+# create coverage configuration
+COVERAGERC_FILE="${SRC_GEN}/.coveragerc"
+echo "[run]" >> "${COVERAGERC_FILE}"
+echo "branch = True" >> "${COVERAGERC_FILE}"
+echo "omit = *test*" >> "${COVERAGERC_FILE}"
 
 # create MANIFEST.in to package openapi-spec and templates
Index: src/mapservice/codegen/templates/test-requirements.mustache
===================================================================
--- src/mapservice/codegen/templates/test-requirements.mustache	(revision a2b80527e9200b6feac74d75840bf6c8c3a26916)
+++ src/mapservice/codegen/templates/test-requirements.mustache	(revision f61d16dca169fde5664167625559dbb0a3208b22)
@@ -1,6 +1,7 @@
 flask_testing
-coverage>=4.0.3
+coverage
 pluggy>=0.3.1
 py>=1.4.31
 pytest
+pytest-cov
 Pillow
Index: src/mapservice/codegen/templates/tox.mustache
===================================================================
--- src/mapservice/codegen/templates/tox.mustache	(revision a2b80527e9200b6feac74d75840bf6c8c3a26916)
+++ src/mapservice/codegen/templates/tox.mustache	(revision f61d16dca169fde5664167625559dbb0a3208b22)
@@ -1,4 +1,4 @@
 [tox]
-envlist = py3
+envlist = clean,py3
 
 [testenv]
@@ -8,3 +8,8 @@
 install_command = {toxinidir}/tox_install_command {opts} {packages}
 
-commands = pytest
+commands = pytest --cov=gnuboat_mapservice --cov-append --cov-report=term-missing
+
+[testenv:clean]
+deps = coverage
+skip_install = true
+commands = coverage erase
