diff --git a/doc/ci/testing/unit_test_report_examples.md b/doc/ci/testing/unit_test_report_examples.md index 1b1600b3d99a3a20561be315337f6a406e7ef8db..8527d0b712d08018e527a56f06793ae12c1de2e2 100644 --- a/doc/ci/testing/unit_test_report_examples.md +++ b/doc/ci/testing/unit_test_report_examples.md @@ -295,3 +295,23 @@ run unittests: junit: - report.xml ``` + +## Helm + +This example uses [Helm Unittest](https://github.com/helm-unittest/helm-unittest#docker-usage) plugin, with the `-t junit` flag to format the output to a JUnit report in XML format. + +```yaml +helm: + image: helmunittest/helm-unittest:latest + stage: test + script: + - '-t JUnit -o report.xml -f tests/*[._]test.yaml .' + artifacts: + reports: + junit: report.xml +``` + +The `-f tests/*[._]test.yaml` flag configures `helm-unittest` to look for files in the `tests/` directory that end in either: + +- `.test.yaml` +- `_test.yaml`