gitlab_quality-test_tooling 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/test-coverage +1 -1
- data/lib/gitlab_quality/test_tooling/code_coverage/README.md +39 -0
- data/lib/gitlab_quality/test_tooling/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7463b8e510a9decd2156d3167e28d6109c99928b03cc5738be19eba7ecccfa39
|
|
4
|
+
data.tar.gz: 2094146a3e6ebcbbcf17ede753e5b1c822b8c33b397cc02550b5c17dac1d19a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1fe5d32ed4521023381d238ad1a5bd17d7b36ea32b9bd888697e0126452a36fab14d2884d3d665f55620cd76d7f9da5048b5bb18b9f61746b0b49e49ed291f5
|
|
7
|
+
data.tar.gz: df998fa7999ae675f4de19227bef692594427c02c30116f9312fbcc07d73312bcccb634efabafe20cea3fc7fa947bb85feab19829b13b1071fd5e5626ed0c5a9
|
data/Gemfile.lock
CHANGED
data/exe/test-coverage
CHANGED
|
@@ -152,7 +152,7 @@ if params.any? && (required_params - params.keys).none?
|
|
|
152
152
|
code_coverage_by_source_file,
|
|
153
153
|
source_file_to_tests,
|
|
154
154
|
tests_to_categories,
|
|
155
|
-
category_owners.
|
|
155
|
+
category_owners.feature_categories_to_teams,
|
|
156
156
|
source_file_types,
|
|
157
157
|
test_classifications
|
|
158
158
|
)
|
|
@@ -5,6 +5,45 @@ Exports test coverage data to ClickHouse, enriched with:
|
|
|
5
5
|
- **Feature category ownership** - group, stage, and section for each covered file
|
|
6
6
|
- **Responsibility classification** - whether coverage comes from unit or integration tests
|
|
7
7
|
|
|
8
|
+
## How It Works
|
|
9
|
+
|
|
10
|
+
### Feature Category Attribution
|
|
11
|
+
|
|
12
|
+
Coverage data is enriched with feature category ownership by joining three data sources:
|
|
13
|
+
|
|
14
|
+
1. **Coverage Report** (LCOV) - which source files have coverage and their percentages
|
|
15
|
+
2. **Test Map** - which test files cover each source file
|
|
16
|
+
3. **Test Reports** (JSON) - which feature category each test file belongs to
|
|
17
|
+
|
|
18
|
+
```mermaid
|
|
19
|
+
flowchart LR
|
|
20
|
+
subgraph Inputs
|
|
21
|
+
A["<b>Coverage Report</b><br/>user.rb: 85%"]
|
|
22
|
+
B["<b>Test Map</b><br/>user.rb → user_spec.rb"]
|
|
23
|
+
C["<b>Test Reports</b><br/>user_spec.rb → user_profile"]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
subgraph Output
|
|
27
|
+
E["<b>ClickHouse Record</b><br/>file: user.rb<br/>feature_category: user_profile<br/>coverage: 85%"]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
A --> D((Join))
|
|
31
|
+
B --> D
|
|
32
|
+
C --> D
|
|
33
|
+
D --> E
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This enables **multi-category attribution**: if a source file is covered by tests from
|
|
37
|
+
multiple feature categories, it creates a separate record for each category in ClickHouse.
|
|
38
|
+
|
|
39
|
+
### Why All Three Inputs Are Required
|
|
40
|
+
|
|
41
|
+
| Input | Provides | Without it |
|
|
42
|
+
|-------|----------|------------|
|
|
43
|
+
| Coverage Report | Line/branch coverage percentages | No coverage metrics |
|
|
44
|
+
| Test Map | Source file → test file relationships | No feature category attribution (all records have `category=NULL`) |
|
|
45
|
+
| Test Reports | Test file → feature category metadata | No feature category attribution (all records have `category=NULL`) |
|
|
46
|
+
|
|
8
47
|
## Responsibility Classification
|
|
9
48
|
|
|
10
49
|
Tests are classified as either **responsible** or **dependent**:
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab_quality-test_tooling
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab Quality
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|