Tracker
provide.testkit.quality.coverage.tracker
¶
Coverage tracking implementation.
Classes¶
CoverageTracker
¶
Wrapper for coverage.py library with testkit integration.
Provides high-level interface for coverage tracking with automatic artifact management and integration with the quality framework.
Initialize coverage tracker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any] | None
|
Coverage configuration options |
None
|
Source code in provide/testkit/quality/coverage/tracker.py
Functions¶
analyze
¶
Run coverage analysis on the given path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to analyze |
required |
**kwargs
|
Any
|
Additional options including artifact_dir |
{}
|
Returns:
| Type | Description |
|---|---|
QualityResult
|
QualityResult with coverage data |
Source code in provide/testkit/quality/coverage/tracker.py
generate_report
¶
Generate coverage report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
format
|
str
|
Report format (terminal, html, xml, json) |
'terminal'
|
Returns:
| Type | Description |
|---|---|
str
|
Report content (for terminal/json) or path (for html/xml) |
Source code in provide/testkit/quality/coverage/tracker.py
get_coverage
¶
Get current coverage percentage.
Returns:
| Type | Description |
|---|---|
float
|
Coverage percentage (0-100) |
Source code in provide/testkit/quality/coverage/tracker.py
report
¶
Generate report from QualityResult (implements QualityTool protocol).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
QualityResult
|
Coverage result |
required |
format
|
str
|
Report format |
'terminal'
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted report |
Source code in provide/testkit/quality/coverage/tracker.py
start
¶
Start coverage tracking.
Source code in provide/testkit/quality/coverage/tracker.py
stop
¶
Stop coverage tracking and save data.