Adi*_*din 7 django continuous-integration code-coverage cobertura jenkins
我正在使用Jenkins ver.1.466与詹金斯Cobertura插件版本.1.5.我为Django项目生成了覆盖率报告.所有图表看起来都不错,但是当我想查看源代码时,我会收到警告消息:
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.
Run Code Online (Sandbox Code Playgroud)
使用以下步骤生成覆盖率报告:
coverage run manage.py test --noinput
coverage xml -o ../reports/coverage.xml
Run Code Online (Sandbox Code Playgroud)
我试着用:
sed 's/filename="/filename="my\/path\//g' coverage.xml > coverage2.xml
Run Code Online (Sandbox Code Playgroud)
但没有帮助,Cobertura插件没有找到相关或绝对路径的源代码.
PS如果我将源代码放入cobertura目录,则会出现一些奇怪的问题- 源代码会显示但不会突出显示.
归档时间: |
|
查看次数: |
2397 次 |
最近记录: |