Skip to content
Snippets Groups Projects
Commit 8442afd8 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Visualize unit test results in GitLab

parent 9142cc2b
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ test: ...@@ -35,7 +35,7 @@ test:
script: script:
- source venv/bin/activate - source venv/bin/activate
- echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql - echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql
- pip install pytest-cov - pip install pytest-cov unittest-xml-reporting
- coverage run --source='.' manage.py test --settings AKPlanning.settings_ci - coverage run --source='.' manage.py test --settings AKPlanning.settings_ci
- coverage report - coverage report
- coverage xml - coverage xml
...@@ -45,3 +45,4 @@ test: ...@@ -45,3 +45,4 @@ test:
coverage_report: coverage_report:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
junit: unit.xml
...@@ -24,3 +24,6 @@ DATABASES = { ...@@ -24,3 +24,6 @@ DATABASES = {
}, },
} }
} }
TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
TEST_OUTPUT_FILE_NAME = 'unit.xml'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment