Consolidate E2E coverage and test report collection
What does this MR do and why?
Consolidates E2E coverage and test report collection into a single job and updates coverage export jobs to merge E2E data with unit test data before exporting to ClickHouse.
Background
We collect code coverage data from multiple test suites:
- Unit tests: RSpec (backend), Jest (frontend), Go tests (Workhorse)
- E2E tests: QA specs running against GDK
Previously, E2E coverage was collected by two separate jobs (process-backend-coverage and process-frontend-coverage) in the child pipeline, downloaded by two separate scripts, and the frontend export job was disabled due to pipeline failures.
This MR consolidates everything into a single job and re-enables the frontend coverage export.
Changes
-
Consolidate E2E coverage collection - Merge
process-backend-coverageandprocess-frontend-coverageinto singleprocess-e2e-coveragejob -
Consolidate artifact downloads - Single
download_e2e_artifacts_from_child_pipeline.rbreplaces two separate download scripts -
Re-enable Jest+E2E export -
test-coverage:export-jest-and-e2ejob is now functional -
Add
allow_failure: true- Coverage jobs won't block pipelines if they fail - Bump test tooling gem - Update to v3.2.0 for responsibility classification support
Artifacts collected by process-e2e-coverage
| Directory | Contents |
|---|---|
coverage-e2e-backend/ |
Coverband coverage files |
coverage-e2e-frontend/ |
Istanbul coverage files |
e2e-test-mapping/ |
Backend test-to-source mappings |
e2e-test-reports/ |
RSpec JSON reports with feature_category metadata |
Related: gitlab-org/quality/analytics/team#339
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Validated the consolidated E2E coverage export jobs in https://gitlab.com/gitlab-org/gitlab/-/pipelines/2198843514.
- Backend (RSpec + E2E) job: Successfully merged RSpec and E2E backend coverage, then exported to ClickHouse
- Frontend (Jest + E2E) job: Successfully merged Jest and E2E frontend coverage, then exported to ClickHouse
Pipeline flow validation
The pipeline demonstrates the complete end-to-end flow of collecting, merging, and exporting coverage data:
Step 1: Unit test coverage is collected
The standard coverage jobs run and produce their artifacts:
-
rspec:coveragejob generates the backend LCOV report and Crystalball test mapping -
coverage-frontendjob generates the frontend LCOV report and Jest test mapping
Step 2: E2E tests run with coverage instrumentation
The https://gitlab.com/gitlab-org/gitlab/-/pipelines/2198930464 runs E2E tests with COVERBAND_ENABLED=true and BABEL_ENV=istanbul. After the tests complete, process-e2e-coverage job collects the E2E coverage artifacts (both backend via Coverband and frontend via Istanbul) along with E2E test reports.
Step 3: Coverage and test mappings are merged then exported
The export jobs download artifacts from both the unit test coverage jobs and the consolidated E2E artifacts:
-
test-coverage:export-rspec-and-e2ejob downloads artifacts from bothrspec:coverageande2e:test-on-gdk, merges the backend LCOV reports, merges the Crystalball and E2E test mappings, then exports the combined data to ClickHouse. -
test-coverage:export-jest-and-e2ejob downloads artifacts from bothcoverage-frontendande2e:test-on-gdk, merges the frontend LCOV reports, merges the Jest and E2E test mappings, then exports the combined data to ClickHouse.
Both jobs completed successfully, confirming the full pipeline works as expected.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.