I am using Jenkins ver. 1.466 with Jenkins Cobertura Plugin ver. 1.5 . I created a Django project coverage report. All the diagrams look good, but when I want to see the source code, I have a warning message:
Source code is unavailable. Some possible reasons are: This is not the most recent build (to save on disk space, this plugin only keepsthe most recent builds source code). Cobertura found the source code but did not provide enough information to locate the source code. Cobertura could not find the source code, so this plugin has no hope of finding it.
A coverage report is created using the following steps:
coverage run manage.py test --noinput coverage xml -o ../reports/coverage.xml
I tried using:
sed 's/filename="/filename="my\/path\//g' coverage.xml > coverage2.xml
but it didn’t help, the Cobertura plugin did not find the source code with a relative or absolute path.
PS Some strange problem, if I put the source code in the cobertura directory - the source code is displayed but not highlighted.
source share