Use JUnit summary results endpoint to load badge counter and Test summary tab
Problem to solve
As an Engineer/Engineer in test I want to be able to load the test tab on the pipeline page faster than I can right now, so that I can quickly fix failed tests in my pipeline.
The tests tab is currently loaded by receiving a payload of the entire parsed Junit Report results for the pipeline. In the case of the gitlab
project and other large projects this can consist of many (20+) JUnit XML files that need to be parsed, converted into structs, and returned to the FE in order to load the test tab. Currently the test tab for the gitlab
project takes ~25s to load.
Intended users
User experience goal
Given that the test results have finished being parsed in the background (likely 25s+ after pipeline completion), the tests tab should take <1000ms to load once clicked and the Test tab counter badge should also take <1000ms to load.
The user should be able to use the pipeline tab in GitLab to find and review failed tests, stack traces for them and time to execute within 5sec of navigating to the Pipeline page
Proposal
In #211838 (closed) we will create an endpoint wherein the summarized report results can be loaded. We should use that endpoint to refactor the data source for the frontend on the test tab.
sequenceDiagram
participant U as User
participant FE as Frontend
participant BE as Backend
U->>FE: Click onto pipeline page
FE->>BE: Request test report summaries (async)
BE->>FE: Return test report summaries from DB
FE->>U: Render badge counter on test tab
U->>FE: Click Test Tab
FE->>U: Render test tab from summary data (No visual change from current)
U->>FE: Click on single test suite
FE->>BE: Request full report for single test suite
BE->>FE: Parse XML report and return detailed report
FE->>U: Render report for single test suite
Specifically this issue is concerned with representing the frontend work for "Render badge counter on test tab" and "Render test tab from summary data (no visual change from current) in the above diagram.
Documentation
This change should largely be not visible to the end user, besides a performance improvement.
Availability & Testing
Testing required
- Unit test changes/additions
- For new calculations for test badge
- FE calculations of badge data
- Appropriate coverage for failures retrieving data
- Async timing issues
- Possible revisit of end user status indicator for window between end of pipeline and test data being available
- For new calculations for test badge
- End-to-end test
- Not required for this iteration as it is core, but will be covered in future test
- package-and-qa not required for this change
What is the type of buyer?
The user of this feature is an IC and this will be available in GitLab Core