I have these line sof code to run tests and generate a coverage report as part of gitlab pipeline:
python -m pytest --durations=0 ./src/unittest -m build-tests --junitxml="junit-test-result-build.xml" --source=./src/main -v --cov-report xml --cov=./src/main
coverage lcov
The results in SonarQube for the overall project shows coverage fine. However, I’ve recently created a new branch and added some new functionality that is covered by unit tests. However, SonarQube shows 0% code coverage for the new code. Is there something wrong with the way I’m generating the report or is the issue somewhere else?