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
Branches
No related tags found
1 merge request!141Add view tests
Pipeline #126936 passed
...@@ -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.
Please register or to comment