I have an Angular project hosted on GitLab and I’m trying to generate Unit test reports via the CI Pipeline. I’m following this guide https://docs.gitlab.com/ee/ci/unit_test_reports.html
There is no Angular example in the docs, that’s why I’m kindy stuck and don’t really know how to approach this task.
here is how my gitlab-ci.yml file looks like :
test:karma:
stage: test
image: trion/ng-cli-karma
allow_failure: false
script:
- npm ci
- ng test --progress false --watch false
artifacts:
reports:
junit: report.xml
tags:
- docker
I have only 3 unit tests in my project. They pass successfully and the pipeline as well it doesn’t fail. However, I don’t get the desired result. Which is the test report.
I haven’t tried this myself but it looks like there is a converter that you can include in your project that will then help create the junit.xml formatted output that GitLab expects to show the report.
thanks for the suggestion, but I already did that actually. And it does work on my local machine. I run the ng test command in the Angular CLI and it does generates the unit test report for me in an .xml file.
But in the Pipeline , it’s a different story. Something is definitely missing to get this working
@jheimbuck_gl
Hey James, I wanted to thank you again for your support the other day and also to ask you about the GitLab API . Is there a limit to how many http requests Im allowed to make in a day or maybe in an hour ? Because my API calls sometimes they go through without an issue, and other times they dont and get this “Too Many Requests” error …
what do you think ?