flowbber.plugins.sources.cobertura
¶This source parses standard Cobertura XML files.
A Cobertura file describes the coverage of source code executed by tests. This files can be generated for several programming languages, including:
.gcno
and .gcda
coverage files,
then processing the source tree with lcov to generate a coverage.info
which is finally converted to Cobertura using lcov_cobertura.-coverprofile
file and then processing
the resulting coverage.json
with gocov-xml.Data collected:
{
"files": {
"my_source_code.c": {
"total_statements": 40,
"total_misses": 20,
"line_rate": 0.5
},
"another_source.c": {
"total_statements": 40,
"total_misses": 40,
"line_rate": 0.0
}
},
"total": {
"total_statements": 80,
"total_misses": 20,
"line_rate": 0.75
}
}
Dependencies:
pip3 install flowbber[cobertura]
Usage:
[[sources]]
type = "cobertura"
id = "..."
[sources.config]
xmlpath = "coverage.xml"
include = ["*"]
exclude = []
{
"sources": [
{
"type": "cobertura",
"id": "...",
"config": {
"xmlpath": "coverage.xml",
"include": ["*"],
"exclude": []
}
}
]
}
Path to the Cobertura coverage.xml
file to be parsed.
Default: N/A
Optional: False
Schema:
{
'type': 'string',
'empty': False,
}
Secret: False
List of patterns of files to include.
Matching is performed using Python’s fnmatch.
Default: ['*']
Optional: True
Schema:
{
'type': 'list',
'schema': {
'type': 'string',
},
}
Secret: False
List of paths to files containing patterns of files to include.
Matching is performed using Python’s fnmatch.
All unique patterns parsed from these files will be added to the ones defined
in the include
configuration option.
Default: []
Optional: True
Schema:
{
'type': 'list',
'schema': {
'type': 'string',
'empty': False,
},
}
Secret: False
List of patterns of files to exclude.
Matching is performed using Python’s fnmatch.
Default: []
Optional: True
Schema:
{
'type': 'list',
'schema': {
'type': 'string',
},
}
Secret: False
List of paths to files containing patterns of files to exclude.
Matching is performed using Python’s fnmatch.
All unique patterns parsed from these files will be added to the ones defined
in the exclude
configuration option.
Default: []
Optional: True
Schema:
{
'type': 'list',
'schema': {
'type': 'string',
'empty': False,
},
}
Secret: False
CoberturaSource
:
Main base class to implement a Source.flowbber.plugins.sources.cobertura.
CoberturaSource
(index, type_, id_, optional=False, timeout=None, config=None)¶Inheritance