Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d1c1194f
Commit
d1c1194f
authored
May 19, 2021
by
Gerardo Gutierrez
Committed by
Evan Read
May 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add example for relative path to be used in coverage XML file
parent
512a4bfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
doc/user/project/merge_requests/test_coverage_visualization.md
...ser/project/merge_requests/test_coverage_visualization.md
+10
-2
No files found.
doc/user/project/merge_requests/test_coverage_visualization.md
View file @
d1c1194f
...
@@ -82,6 +82,14 @@ to the project root:
...
@@ -82,6 +82,14 @@ to the project root:
```
shell
```
shell
Auth/User.cs
Auth/User.cs
Lib/Utils/User.cs
Lib/Utils/User.cs
src/main/java
```
In the Cobertura XML, the
`filename`
attribute in the
`class`
element assumes the value is a
relative path to project's root.
```
xml
<class
name=
"packet.name"
filename=
"src/main/java"
line-rate=
"0.0"
branch-rate=
"0.0"
complexity=
"5"
>
```
```
And the
`sources`
from Cobertura XML with paths in the format of
`<CI_BUILDS_DIR>/<PROJECT_FULL_PATH>/...`
:
And the
`sources`
from Cobertura XML with paths in the format of
`<CI_BUILDS_DIR>/<PROJECT_FULL_PATH>/...`
:
...
@@ -153,7 +161,7 @@ coverage-jdk11:
...
@@ -153,7 +161,7 @@ coverage-jdk11:
stage
:
visualize
stage
:
visualize
image
:
registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
image
:
registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
script
:
script
:
# convert report from jacoco to cobertura
# convert report from jacoco to cobertura
, use relative project path
-
'
python
/opt/cover2cover.py
target/site/jacoco/jacoco.xml
src/main/java
>
target/site/cobertura.xml'
-
'
python
/opt/cover2cover.py
target/site/jacoco/jacoco.xml
src/main/java
>
target/site/cobertura.xml'
# read the <source></source> tag and prepend the path to every filename attribute
# read the <source></source> tag and prepend the path to every filename attribute
-
'
python
/opt/source2filename.py
target/site/cobertura.xml'
-
'
python
/opt/source2filename.py
target/site/cobertura.xml'
...
@@ -193,7 +201,7 @@ coverage-jdk11:
...
@@ -193,7 +201,7 @@ coverage-jdk11:
stage
:
visualize
stage
:
visualize
image
:
registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
image
:
registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
script
:
script
:
# convert report from jacoco to cobertura
# convert report from jacoco to cobertura
, use relative project path
-
'
python
/opt/cover2cover.py
build/jacoco/jacoco.xml
src/main/java
>
build/cobertura.xml'
-
'
python
/opt/cover2cover.py
build/jacoco/jacoco.xml
src/main/java
>
build/cobertura.xml'
# read the <source></source> tag and prepend the path to every filename attribute
# read the <source></source> tag and prepend the path to every filename attribute
-
'
python
/opt/source2filename.py
build/cobertura.xml'
-
'
python
/opt/source2filename.py
build/cobertura.xml'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment