Add Test Runs and Test Coverage Data to Project Quality Summary
What does this MR do and why?
For #341973 (closed), #322018 (closed)
This MR adds test run and test coverage data to the Project Quality Summary. Mainly this means building out the project_quality_summary/app.vue
component to load data from GraphQL and display it in single stats inside of cards. This MR also adds tests for this functionality and a GraphQL fixture to generate data for the tests.
This page is behind the project_quality_summary_page
feature flag, so this MR does not include a changelog or documentation.
This MR adds a generic loading state and flash message to show if loading fails, but the empty states for test runs and test coverage will be handled separately - this MR does not include empty states.
Screenshots or screen recordings
case | screenshot |
---|---|
with coverage data (and no test run data) | |
with test run data (and no coverage data) | |
loading | |
error | |
tooltips |
How to set up and validate locally
git checkout 341973-add-coverage-to-project-quality-summary
echo "Feature.enable(:project_quality_summary_page)" | rails c
- for
Test runs
:- set up unit tests for a project (or clone this test project)
- run a pipeline for the default branch of that project that generates a unit test report
- navigate to the project =>
Analytics
=>CI/CD
, then click theProject quality
tab - verify that the passed/failed/skipped percentages in the
Test runs
card is correct
- for
Test coverage
:- set up coverage for a project (or clone this test project)
- run a pipeline for the default branch of that project that generates a coverage percentage
- navigate to the project =>
Analytics
=>CI/CD
, then click theProject quality
tab - verify that the coverage percentage in the
Test coverage
card is correct
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.